From 80172e43640d2ec3c761611d2269d12a9abdd424 Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 12 May 2023 18:53:08 +0000 Subject: fix warnings --- azalea/src/pathfinder/astar.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'azalea/src') diff --git a/azalea/src/pathfinder/astar.rs b/azalea/src/pathfinder/astar.rs index 858e7720..65caf337 100644 --- a/azalea/src/pathfinder/astar.rs +++ b/azalea/src/pathfinder/astar.rs @@ -94,7 +94,7 @@ pub struct Edge { pub cost: W, } -#[derive(PartialOrd, PartialEq)] +#[derive(PartialEq)] pub struct Weight(W); impl Ord for Weight { fn cmp(&self, other: &Self) -> std::cmp::Ordering { @@ -104,3 +104,8 @@ impl Ord for Weight { } } impl Eq for Weight {} +impl PartialOrd for Weight { + fn partial_cmp(&self, other: &Self) -> Option { + self.0.partial_cmp(&other.0) + } +} -- cgit v1.2.3