Performance improvements and fix warnings

This commit is contained in:
hal8174 2024-01-02 23:22:20 +01:00
parent 68d0f64058
commit b5dcbccf02
6 changed files with 202 additions and 55 deletions

View file

@ -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 {