From d852ee906d2f4021fc58f9754880adfd7c152bd8 Mon Sep 17 00:00:00 2001 From: Mingwei Zhang Date: Tue, 16 Jan 2024 19:57:53 -0800 Subject: [PATCH] fix testing --- examples/all_paths_between_two_ases.rs | 2 +- examples/shortest_path_between_two_ases.rs | 2 +- src/lib.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/all_paths_between_two_ases.rs b/examples/all_paths_between_two_ases.rs index 4b91117..9298c36 100644 --- a/examples/all_paths_between_two_ases.rs +++ b/examples/all_paths_between_two_ases.rs @@ -12,7 +12,7 @@ fn main() { let ut_path = topo.paths_graph(university_of_twente_asn); let paths = all_simple_paths::, _>( - ut_path.graph, + &ut_path.graph, ut_path.index_of(university_of_twente_asn).unwrap(), ut_path.index_of(universidade_de_sao_paulo_asn).unwrap(), 0, diff --git a/examples/shortest_path_between_two_ases.rs b/examples/shortest_path_between_two_ases.rs index 6279fae..656fc83 100644 --- a/examples/shortest_path_between_two_ases.rs +++ b/examples/shortest_path_between_two_ases.rs @@ -13,7 +13,7 @@ fn main() { // Use A* to find the shortest path between two nodes let (_len, path) = astar( - ut_path.graph, + &ut_path.graph, ut_path.index_of(university_of_twente_asn).unwrap(), |finish| finish == ut_path.index_of(universidade_de_sao_paulo_asn).unwrap(), |edge| match edge.weight() { diff --git a/src/lib.rs b/src/lib.rs index a93f493..1e52e1c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -439,6 +439,6 @@ mod test { assert!(has_edge(3, 6)); assert_eq!(topo.graph.edge_count(), 7); - assert!(!is_cyclic_directed(topo.graph)); + assert!(!is_cyclic_directed(&topo.graph)); } }