From dff440c4a86b59041a9107b725c3e0f204084462 Mon Sep 17 00:00:00 2001 From: Ilya Grigoriev Date: Thu, 25 Jan 2024 21:48:35 -0800 Subject: [PATCH] `clippy`: Fix nightly warnings about "useless use of vec!" --- lib/src/revset_graph.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/src/revset_graph.rs b/lib/src/revset_graph.rs index fb10bb5e6..ff3c4b72f 100644 --- a/lib/src/revset_graph.rs +++ b/lib/src/revset_graph.rs @@ -380,7 +380,7 @@ mod tests { #[test] fn test_topo_grouped_multiple_roots() { - let graph = vec![ + let graph = [ (id('C'), vec![missing('Y')]), (id('B'), vec![missing('X')]), (id('A'), vec![]), @@ -1157,7 +1157,7 @@ mod tests { #[test] fn test_topo_grouped_merge_multiple_roots() { - let graph = vec![ + let graph = [ (id('D'), vec![direct('C')]), (id('C'), vec![direct('B'), direct('A')]), (id('B'), vec![missing('X')]), @@ -1474,7 +1474,7 @@ mod tests { #[test] fn test_topo_grouped_requeue_unpopulated() { - let graph = vec![ + let graph = [ (id('C'), vec![direct('A'), direct('B')]), (id('B'), vec![direct('A')]), (id('A'), vec![]), @@ -1513,7 +1513,7 @@ mod tests { fn test_topo_grouped_duplicated_edges() { // The graph shouldn't have duplicated parent->child edges, but topo-grouped // iterator can handle it anyway. - let graph = vec![(id('B'), vec![direct('A'), direct('A')]), (id('A'), vec![])]; + let graph = [(id('B'), vec![direct('A'), direct('A')]), (id('A'), vec![])]; insta::assert_snapshot!(format_graph(graph.iter().cloned()), @r###" B direct(A), direct(A) │