about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChayim Refael Friedman <chayimfr@gmail.com>2022-02-25 01:00:24 +0000
committerGitHub <noreply@github.com>2022-02-25 01:25:42 +0000
commitab2af50655ebf026737c3c06dc9c925d68911a57 (patch)
treed9a82d0096065bec0bc9d6a9e4c1105c5b106acb
parent73708d44056b09e037f54eab6a002213a8426558 (diff)
downloadrust-ab2af50655ebf026737c3c06dc9c925d68911a57.tar.gz
rust-ab2af50655ebf026737c3c06dc9c925d68911a57.zip
Minor perf change: `vec.clone().into_iter()` => `vec.iter().cloned()`
-rw-r--r--crates/ide_assists/src/handlers/extract_module.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide_assists/src/handlers/extract_module.rs b/crates/ide_assists/src/handlers/extract_module.rs
index f43aa61fcb1..880617dd38d 100644
--- a/crates/ide_assists/src/handlers/extract_module.rs
+++ b/crates/ide_assists/src/handlers/extract_module.rs
@@ -179,7 +179,7 @@ impl Module {
         //Here impl is not included as each item inside impl will be tied to the parent of
         //implementing block(a struct, enum, etc), if the parent is in selected module, it will
         //get updated by ADT section given below or if it is not, then we dont need to do any operation
-        self.body_items.clone().into_iter().for_each(|item| {
+        self.body_items.iter().cloned().for_each(|item| {
             match_ast! {
                 match (item.syntax()) {
                     ast::Adt(it) => {