Skip to content

Commit fb4b0f4

Browse files
argon2: configure lints at the toplevel
To pass the newly enabled clippy lints, add a missing safety comment to the compress_avx2 call.
1 parent 267c753 commit fb4b0f4

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

argon2/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
clippy::cast_sign_loss,
1414
clippy::checked_conversions,
1515
clippy::implicit_saturating_sub,
16+
clippy::missing_safety_doc,
1617
clippy::panic,
1718
clippy::panic_in_result_fn,
19+
clippy::undocumented_unsafe_blocks,
1820
clippy::unwrap_used,
1921
missing_docs,
2022
rust_2018_idioms,
@@ -525,6 +527,7 @@ impl<'key> Argon2<'key> {
525527
}
526528

527529
if self.cpu_feat_avx2.get() {
530+
// SAFETY: checked that AVX2 was detected.
528531
return unsafe { compress_avx2(rhs, lhs) };
529532
}
530533
}

argon2/src/memory.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@
88
//! > length of q/SL. Segments of the same slice can be computed in parallel and do not reference
99
//! > blocks from each other. All other blocks can be referenced.
1010
11-
#![warn(
12-
clippy::undocumented_unsafe_blocks,
13-
clippy::missing_safety_doc,
14-
unsafe_op_in_unsafe_fn
15-
)]
16-
1711
use core::marker::PhantomData;
1812
use core::ptr::NonNull;
1913

0 commit comments

Comments
 (0)