Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrubeck committed Nov 6, 2022
1 parent 762e1c2 commit bd983a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1330,7 +1330,7 @@ fn raw_double_bits<F: Float>(f: &F) -> u64 {
}

let exp_u64 = exp as u16 as u64;
let sign_u64 = if sign > 0 { 1u64 } else { 0u64 };
let sign_u64 = (sign > 0) as u64;
(man & MAN_MASK) | ((exp_u64 << 52) & EXP_MASK) | ((sign_u64 << 63) & SIGN_MASK)
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ fn not_nan_panic_safety() {
let catch_op = |mut num, op: fn(&mut NotNan<_>)| {
let mut num_ref = panic::AssertUnwindSafe(&mut num);
#[allow(clippy::needless_borrow)] // mut-borrow needed for msrv 1.36.0
let _ = panic::catch_unwind(move || op(&mut *num_ref));
let _ = panic::catch_unwind(move || op(&mut num_ref));
num
};

Expand Down

0 comments on commit bd983a8

Please sign in to comment.