diff --git a/cmov/src/lib.rs b/cmov/src/lib.rs index 404f3cec..b63bb9c0 100644 --- a/cmov/src/lib.rs +++ b/cmov/src/lib.rs @@ -17,6 +17,7 @@ clippy::std_instead_of_alloc, clippy::std_instead_of_core, clippy::unwrap_used, + missing_copy_implementations, missing_debug_implementations, missing_docs, rust_2018_idioms, diff --git a/ctutils/src/ct_option.rs b/ctutils/src/ct_option.rs index 43ab1274..3cbc32e4 100644 --- a/ctutils/src/ct_option.rs +++ b/ctutils/src/ct_option.rs @@ -622,7 +622,7 @@ mod tests { #[test] fn map_macro() { assert!(map!(NONE, u16::from).is_none().to_bool()); - assert_eq!(map!(SOME, u16::from).unwrap(), VALUE as u16); + assert_eq!(map!(SOME, u16::from).unwrap(), u16::from(VALUE)); } #[test] diff --git a/ctutils/src/lib.rs b/ctutils/src/lib.rs index c8dabd84..8756f2eb 100644 --- a/ctutils/src/lib.rs +++ b/ctutils/src/lib.rs @@ -6,13 +6,24 @@ )] #![deny(unsafe_code)] #![warn( + clippy::cast_lossless, + clippy::cast_possible_truncation, + clippy::cast_precision_loss, + clippy::checked_conversions, + clippy::implicit_saturating_sub, + clippy::integer_division_remainder_used, clippy::mod_module_files, - missing_docs, - missing_debug_implementations, + clippy::panic, + clippy::panic_in_result_fn, + clippy::std_instead_of_alloc, + clippy::std_instead_of_core, missing_copy_implementations, + missing_debug_implementations, + missing_docs, rust_2018_idioms, trivial_casts, trivial_numeric_casts, + unused_lifetimes, unused_qualifications )] #![cfg_attr(not(test), warn(clippy::unwrap_used))] diff --git a/ctutils/src/traits/ct_select.rs b/ctutils/src/traits/ct_select.rs index 5e807529..5f7e3c65 100644 --- a/ctutils/src/traits/ct_select.rs +++ b/ctutils/src/traits/ct_select.rs @@ -59,6 +59,7 @@ impl CtSelect for isize { } #[cfg(target_pointer_width = "64")] + #[allow(clippy::cast_possible_truncation)] #[inline] fn ct_select(&self, other: &Self, choice: Choice) -> Self { (*self as i64).ct_select(&(*other as i64), choice) as isize @@ -74,6 +75,7 @@ impl CtSelect for usize { } #[cfg(target_pointer_width = "64")] + #[allow(clippy::cast_possible_truncation)] #[inline] fn ct_select(&self, other: &Self, choice: Choice) -> Self { (*self as u64).ct_select(&(*other as u64), choice) as usize