Skip to content
Snippets Groups Projects
Commit 7cdbf048 authored by Éloïs's avatar Éloïs
Browse files

[style] comply to clippy v0.0.212

parent 0f9e14d1
No related branches found
No related tags found
1 merge request!246Upgrade all dependencies and migrate to actix-web 2.0
...@@ -53,15 +53,19 @@ impl<T: WebOfTrust> PathFinder<T> for RustyPathFinder { ...@@ -53,15 +53,19 @@ impl<T: WebOfTrust> PathFinder<T> for RustyPathFinder {
for node in border { for node in border {
for source in &wot.get_links_source(node).unwrap() { for source in &wot.get_links_source(node).unwrap() {
if graph[source.0].0 > distance { match graph[source.0].0 {
path_distance if path_distance > distance => {
// shorter path, we replace // shorter path, we replace
graph[source.0] = (distance, vec![node]); graph[source.0] = (distance, vec![node]);
next_border.insert(*source); next_border.insert(*source);
} else if graph[source.0].0 == distance { }
path_distance if path_distance == distance => {
// same length, we combine // same length, we combine
graph[source.0].1.push(node); graph[source.0].1.push(node);
next_border.insert(*source); next_border.insert(*source);
} }
_ => unreachable!(),
}
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment