Performance improvements and fix warnings
This commit is contained in:
parent
68d0f64058
commit
b5dcbccf02
6 changed files with 202 additions and 55 deletions
|
|
@ -1,9 +1,4 @@
|
|||
use std::{
|
||||
collections::{BinaryHeap, HashMap},
|
||||
fmt::Debug,
|
||||
hash::Hash,
|
||||
hash::Hasher,
|
||||
};
|
||||
use std::{collections::HashMap, fmt::Debug, hash::Hash, hash::Hasher};
|
||||
|
||||
use crate::priority_queue::PriorityQueue;
|
||||
|
||||
|
|
@ -87,7 +82,7 @@ where
|
|||
if score < n.score {
|
||||
n.parent = o.node.clone();
|
||||
n.score = score;
|
||||
q.decrease_key(&h, |i| i.score = score);
|
||||
q.decrease_key(h, |i| i.score = score);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue