Skip to content

Commit 0622e7f

Browse files
lengyijungarro95
authored andcommitted
Reuse a variable
Performance
1 parent 9944734 commit 0622e7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/priority_queue/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ where
772772
self.store.swap(i, largest);
773773

774774
i = largest;
775-
let mut largestp = unsafe { self.store.get_priority_from_position(i) };
775+
largestp = unsafe { self.store.get_priority_from_position(i) };
776776
l = left(i);
777777
if l.0 < self.len() {
778778
let childp = unsafe { self.store.get_priority_from_position(l) };

0 commit comments

Comments
 (0)