Skip to content

Commit 77b1457

Browse files
jo-gorombrubeck
authored andcommitted
Removes two needless borrows
1 parent 6d2f2d2 commit 77b1457

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,7 @@ impl Borrow<f64> for NotNan<f64> {
932932
#[allow(clippy::derive_ord_xor_partial_ord)]
933933
impl<T: Float> Ord for NotNan<T> {
934934
fn cmp(&self, other: &NotNan<T>) -> Ordering {
935-
match self.partial_cmp(&other) {
935+
match self.partial_cmp(other) {
936936
Some(ord) => ord,
937937
None => unsafe { unreachable_unchecked() },
938938
}

tests/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ fn not_nan_usage_in_const_context() {
665665
fn not_nan_panic_safety() {
666666
let catch_op = |mut num, op: fn(&mut NotNan<_>)| {
667667
let mut num_ref = panic::AssertUnwindSafe(&mut num);
668-
let _ = panic::catch_unwind(move || op(&mut *num_ref));
668+
let _ = panic::catch_unwind(move || op(*num_ref));
669669
num
670670
};
671671

0 commit comments

Comments
 (0)