Skip to content

Commit

Permalink
Address clippy::len_zero.
Browse files Browse the repository at this point in the history
  • Loading branch information
briansmith committed May 12, 2021
1 parent b86067d commit 609a0f8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions mk/clippy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,12 @@ cargo clippy \
--allow clippy::collapsible_if \
--allow clippy::identity_op \
--allow clippy::len_without_is_empty \
--allow clippy::len_zero \
--allow clippy::ptr_arg \
--allow clippy::let_unit_value \
--allow clippy::many_single_char_names \
--allow clippy::new_without_default \
--allow clippy::neg_cmp_op_on_partial_ord \
--allow clippy::too_many_arguments \
--allow clippy::trivially_copy_pass_by_ref \
--allow clippy::type_complexity \
--allow clippy::unreadable_literal \
--allow clippy::upper_case_acronyms \
Expand Down
2 changes: 1 addition & 1 deletion src/aead/chacha20_poly1305.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ struct Out {

#[inline]
fn poly1305_update_padded_16(ctx: &mut poly1305::Context, input: &[u8]) {
if input.len() > 0 {
if !input.is_empty() {
ctx.update(input);
let remainder_len = input.len() % poly1305::BLOCK_LEN;
if remainder_len != 0 {
Expand Down

0 comments on commit 609a0f8

Please sign in to comment.