aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/ast/edit.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/ast/edit.rs')
-rw-r--r--crates/ra_syntax/src/ast/edit.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_syntax/src/ast/edit.rs b/crates/ra_syntax/src/ast/edit.rs
index baf9a1b4b..3d023f189 100644
--- a/crates/ra_syntax/src/ast/edit.rs
+++ b/crates/ra_syntax/src/ast/edit.rs
@@ -80,12 +80,12 @@ where
80 80
81impl ast::ItemList { 81impl ast::ItemList {
82 #[must_use] 82 #[must_use]
83 pub fn append_items(&self, items: impl Iterator<Item = ast::ImplItem>) -> ast::ItemList { 83 pub fn append_items(&self, items: impl IntoIterator<Item = ast::ImplItem>) -> ast::ItemList {
84 let mut res = self.clone(); 84 let mut res = self.clone();
85 if !self.syntax().text().contains_char('\n') { 85 if !self.syntax().text().contains_char('\n') {
86 res = make_multiline(res); 86 res = make_multiline(res);
87 } 87 }
88 items.for_each(|it| res = res.append_item(it)); 88 items.into_iter().for_each(|it| res = res.append_item(it));
89 res 89 res
90 } 90 }
91 91
@@ -339,13 +339,13 @@ impl ast::UseTree {
339 339
340impl ast::MatchArmList { 340impl ast::MatchArmList {
341 #[must_use] 341 #[must_use]
342 pub fn append_arms(&self, items: impl Iterator<Item = ast::MatchArm>) -> ast::MatchArmList { 342 pub fn append_arms(&self, items: impl IntoIterator<Item = ast::MatchArm>) -> ast::MatchArmList {
343 let mut res = self.clone(); 343 let mut res = self.clone();
344 res = res.strip_if_only_whitespace(); 344 res = res.strip_if_only_whitespace();
345 if !res.syntax().text().contains_char('\n') { 345 if !res.syntax().text().contains_char('\n') {
346 res = make_multiline(res); 346 res = make_multiline(res);
347 } 347 }
348 items.for_each(|it| res = res.append_arm(it)); 348 items.into_iter().for_each(|it| res = res.append_arm(it));
349 res 349 res
350 } 350 }
351 351