Skip to content

Commit

Permalink
Use assert
Browse files Browse the repository at this point in the history
  • Loading branch information
novacrazy committed May 18, 2023
1 parent 73c6614 commit 8e148c0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ pub struct SmolStr(Repr);
impl SmolStr {
#[deprecated = "Use `new_inline` instead"]
pub const fn new_inline_from_ascii(len: usize, bytes: &[u8]) -> SmolStr {
#[allow(clippy::let_unit_value)]
let _len_is_short = [(); INLINE_CAP + 1][len];
assert!(len < INLINE_CAP + 1);

const ZEROS: &[u8] = &[0; INLINE_CAP];

Expand Down

0 comments on commit 8e148c0

Please sign in to comment.