Fix RouteKey PartialOrd implementation

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
This commit is contained in:
Lee Smet committed 2023-10-23 15:59:18 +02:00
1 parent d397a1fa26
commit a4d54faba8
1 file changed
+1 -7
+1 -7
View File
@@ -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 {