diff --git a/lib/dubp/wot/operations/path.rs b/lib/dubp/wot/operations/path.rs
index 99a3a8e39fc78de0c3e3f36b9228ef0e99f8d763..4304e1822284bfc5fadb8782ba54da9a3f2ce9b2 100644
--- a/lib/dubp/wot/operations/path.rs
+++ b/lib/dubp/wot/operations/path.rs
@@ -53,14 +53,18 @@ impl<T: WebOfTrust> PathFinder<T> for RustyPathFinder {
 
             for node in border {
                 for source in &wot.get_links_source(node).unwrap() {
-                    if graph[source.0].0 > distance {
-                        // shorter path, we replace
-                        graph[source.0] = (distance, vec![node]);
-                        next_border.insert(*source);
-                    } else if graph[source.0].0 == distance {
-                        // same length, we combine
-                        graph[source.0].1.push(node);
-                        next_border.insert(*source);
+                    match graph[source.0].0 {
+                        path_distance if path_distance > distance => {
+                            // shorter path, we replace
+                            graph[source.0] = (distance, vec![node]);
+                            next_border.insert(*source);
+                        }
+                        path_distance if path_distance == distance => {
+                            // same length, we combine
+                            graph[source.0].1.push(node);
+                            next_border.insert(*source);
+                        }
+                        _ => unreachable!(),
                     }
                 }
             }