Skip to content

Commit 1444e63

Browse files
authored
style: include needless_collect (#751)
1 parent ea72bc8 commit 1444e63

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ fallible_impl_from = { level = "allow", priority = 1 }
157157
imprecise_flops = { level = "allow", priority = 1 }
158158
iter_on_single_items = { level = "allow", priority = 1 }
159159
missing_const_for_fn = { level = "allow", priority = 1 }
160-
needless_collect = { level = "allow", priority = 1 }
161160
nonstandard_macro_braces = { level = "allow", priority = 1 }
162161
option_if_let_else = { level = "allow", priority = 1 }
163162
redundant_clone = { level = "allow", priority = 1 }

src/string/autocomplete_using_trie.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ impl Trie {
2121
fn insert(&mut self, text: &str) {
2222
let mut trie = self;
2323

24-
for c in text.chars().collect::<Vec<char>>() {
24+
for c in text.chars() {
2525
trie = trie.0.entry(c).or_insert_with(|| Box::new(Trie::new()));
2626
}
2727

@@ -31,7 +31,7 @@ impl Trie {
3131
fn find(&self, prefix: &str) -> Vec<String> {
3232
let mut trie = self;
3333

34-
for c in prefix.chars().collect::<Vec<char>>() {
34+
for c in prefix.chars() {
3535
let char_trie = trie.0.get(&c);
3636
if let Some(char_trie) = char_trie {
3737
trie = char_trie;

0 commit comments

Comments
 (0)