Skip to content

Commit 759dc51

Browse files
committed
ctutils: expand clippy lints
1 parent a33cdd0 commit 759dc51

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

cmov/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
clippy::std_instead_of_alloc,
1818
clippy::std_instead_of_core,
1919
clippy::unwrap_used,
20+
missing_copy_implementations,
2021
missing_debug_implementations,
2122
missing_docs,
2223
rust_2018_idioms,

ctutils/src/lib.rs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,24 @@
66
)]
77
#![deny(unsafe_code)]
88
#![warn(
9+
clippy::cast_lossless,
10+
clippy::cast_possible_truncation,
11+
clippy::cast_precision_loss,
12+
clippy::checked_conversions,
13+
clippy::implicit_saturating_sub,
14+
clippy::integer_division_remainder_used,
915
clippy::mod_module_files,
10-
missing_docs,
11-
missing_debug_implementations,
16+
clippy::panic,
17+
clippy::panic_in_result_fn,
18+
clippy::std_instead_of_alloc,
19+
clippy::std_instead_of_core,
1220
missing_copy_implementations,
21+
missing_debug_implementations,
22+
missing_docs,
1323
rust_2018_idioms,
1424
trivial_casts,
1525
trivial_numeric_casts,
26+
unused_lifetimes,
1627
unused_qualifications
1728
)]
1829
#![cfg_attr(not(test), warn(clippy::unwrap_used))]

ctutils/src/traits/ct_select.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ impl CtSelect for isize {
5959
}
6060

6161
#[cfg(target_pointer_width = "64")]
62+
#[allow(clippy::cast_possible_truncation)]
6263
#[inline]
6364
fn ct_select(&self, other: &Self, choice: Choice) -> Self {
6465
(*self as i64).ct_select(&(*other as i64), choice) as isize
@@ -74,6 +75,7 @@ impl CtSelect for usize {
7475
}
7576

7677
#[cfg(target_pointer_width = "64")]
78+
#[allow(clippy::cast_possible_truncation)]
7779
#[inline]
7880
fn ct_select(&self, other: &Self, choice: Choice) -> Self {
7981
(*self as u64).ct_select(&(*other as u64), choice) as usize

0 commit comments

Comments
 (0)