File tree Expand file tree Collapse file tree 4 files changed +17
-3
lines changed
Expand file tree Collapse file tree 4 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 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,
Original file line number Diff line number Diff line change @@ -622,7 +622,7 @@ mod tests {
622622 #[ test]
623623 fn map_macro ( ) {
624624 assert ! ( map!( NONE , u16 :: from) . is_none( ) . to_bool( ) ) ;
625- assert_eq ! ( map!( SOME , u16 :: from) . unwrap( ) , VALUE as u16 ) ;
625+ assert_eq ! ( map!( SOME , u16 :: from) . unwrap( ) , u16 :: from ( VALUE ) ) ;
626626 }
627627
628628 #[ test]
Original file line number Diff line number Diff line change 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) ) ]
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments