Skip to content

Commit 4601ee7

Browse files
committed
Fix warning from lint clippy::needless_borrow
1 parent 3c1b4cf commit 4601ee7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/binary_heap.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ pub struct MaxComparator;
288288

289289
impl<T: Ord> Compare<T> for MaxComparator {
290290
fn compare(&self, a: &T, b: &T) -> Ordering {
291-
a.cmp(&b)
291+
a.cmp(b)
292292
}
293293
}
294294

@@ -300,7 +300,7 @@ pub struct MinComparator;
300300

301301
impl<T: Ord> Compare<T> for MinComparator {
302302
fn compare(&self, a: &T, b: &T) -> Ordering {
303-
b.cmp(&a)
303+
b.cmp(a)
304304
}
305305
}
306306

0 commit comments

Comments
 (0)