Make crypto/ clippy-clean, mostly by telling clippy to shut up
[dnssec-prover] / src / crypto / bigint.rs
index a9245a47884866d2669ecb6eb2035c6a208ff257..eec0a56f8d380745e61b5e2486fe9b608859674c 100644 (file)
@@ -3,6 +3,11 @@
 use alloc::vec::Vec;
 use core::marker::PhantomData;
 
+#[allow(clippy::needless_lifetimes)] // lifetimes improve readability
+#[allow(clippy::needless_borrow)] // borrows indicate read-only/non-move
+#[allow(clippy::too_many_arguments)] // sometimes we don't have an option
+#[allow(clippy::identity_op)] // sometimes identities improve readability for repeated actions
+
 // **************************************
 // * Implementations of math primitives *
 // **************************************
@@ -698,7 +703,7 @@ impl U4096 {
                if self > m { return Err(()); }
 
                let mut t = [0; WORD_COUNT_4096];
-               if &m.0[..WORD_COUNT_4096 - 1] == &[0; WORD_COUNT_4096 - 1] && m.0[WORD_COUNT_4096 - 1] == 1 {
+               if m.0[..WORD_COUNT_4096 - 1] == [0; WORD_COUNT_4096 - 1] && m.0[WORD_COUNT_4096 - 1] == 1 {
                        return Ok(U4096(t));
                }
                t[WORD_COUNT_4096 - 1] = 1;