Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmov/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion ctutils/src/ct_option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
15 changes: 13 additions & 2 deletions ctutils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))]
Expand Down
2 changes: 2 additions & 0 deletions ctutils/src/traits/ct_select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down