From e0d043199ffe66d013455fc66d2be090766c8431 Mon Sep 17 00:00:00 2001 From: vil02 <65706193+vil02@users.noreply.github.com> Date: Tue, 1 Oct 2024 00:04:47 +0200 Subject: [PATCH] style: include `from_iter_instead_of_collect` --- Cargo.toml | 1 - src/data_structures/union_find.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0c7797a3301..d2fcce86aa8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,7 +39,6 @@ enum_glob_use = { level = "allow", priority = 1 } explicit_deref_methods = { level = "allow", priority = 1 } explicit_iter_loop = { level = "allow", priority = 1 } float_cmp = { level = "allow", priority = 1 } -from_iter_instead_of_collect = { level = "allow", priority = 1 } if_not_else = { level = "allow", priority = 1 } implicit_clone = { level = "allow", priority = 1 } implicit_hasher = { level = "allow", priority = 1 } diff --git a/src/data_structures/union_find.rs b/src/data_structures/union_find.rs index 6928bbdfed9..b7cebd18c06 100644 --- a/src/data_structures/union_find.rs +++ b/src/data_structures/union_find.rs @@ -128,7 +128,7 @@ mod tests { #[test] fn test_union_find() { - let mut uf = UnionFind::from_iter(0..10); + let mut uf = (0..10).collect::>(); assert_eq!(uf.find(&0), Some(0)); assert_eq!(uf.find(&1), Some(1)); assert_eq!(uf.find(&2), Some(2));