diff options
| author | mat <github@matdoes.dev> | 2023-05-12 18:53:08 +0000 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2023-05-12 18:53:08 +0000 |
| commit | 80172e43640d2ec3c761611d2269d12a9abdd424 (patch) | |
| tree | c752a88bdef16502474ca4b1eb5d90c9b4559fe6 /azalea/src | |
| parent | e1e1063d15a97bf93ec6dd1a082f78b0c3191d1d (diff) | |
| download | azalea-drasl-80172e43640d2ec3c761611d2269d12a9abdd424.tar.xz | |
fix warnings
Diffstat (limited to 'azalea/src')
| -rw-r--r-- | azalea/src/pathfinder/astar.rs | 7 |
1 files changed, 6 insertions, 1 deletions
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<N: Eq + Hash + Copy, W: PartialOrd + Copy> { pub cost: W, } -#[derive(PartialOrd, PartialEq)] +#[derive(PartialEq)] pub struct Weight<W: PartialOrd + Debug>(W); impl<W: PartialOrd + Debug> Ord for Weight<W> { fn cmp(&self, other: &Self) -> std::cmp::Ordering { @@ -104,3 +104,8 @@ impl<W: PartialOrd + Debug> Ord for Weight<W> { } } impl<W: PartialOrd + Debug> Eq for Weight<W> {} +impl<W: PartialOrd + Debug> PartialOrd for Weight<W> { + fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> { + self.0.partial_cmp(&other.0) + } +} |
