mirror of
https://github.com/threefoldtech/mycelium.git
synced 2026-10-22 13:41:15 +00:00
Fix RouteKey PartialOrd implementation
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
This commit is contained in:
1 file changed
+1
-7
@@ -22,13 +22,7 @@ pub struct RouteKey {
|
||||
impl Eq for RouteKey {}
|
||||
impl PartialOrd for RouteKey {
|
||||
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
|
||||
match self.subnet.partial_cmp(&other.subnet) {
|
||||
Some(Ordering::Equal) => self
|
||||
.neighbor
|
||||
.overlay_ip()
|
||||
.partial_cmp(&other.neighbor.overlay_ip()),
|
||||
ord => ord,
|
||||
}
|
||||
Some(self.cmp(other))
|
||||
}
|
||||
}
|
||||
impl Ord for RouteKey {
|
||||
|
||||
Reference in new issue
Block a user