aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/ast/edit.rs
diff options
context:
space:
mode:
authorEdwin Cheng <[email protected]>2020-05-05 16:56:10 +0100
committerEdwin Cheng <[email protected]>2020-05-05 16:56:10 +0100
commit92665358cd98913e3fef8294e1889cc0bb919e3f (patch)
tree0c95a20510f832ec5f208a1ede39f8aad8ffcd86 /crates/ra_syntax/src/ast/edit.rs
parent756e91732b7a92d9156f5c1d8ffcaf5155cf4680 (diff)
Rename ImplItem to AssocItem
Diffstat (limited to 'crates/ra_syntax/src/ast/edit.rs')
-rw-r--r--crates/ra_syntax/src/ast/edit.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_syntax/src/ast/edit.rs b/crates/ra_syntax/src/ast/edit.rs
index c507dc683..3e6dd6061 100644
--- a/crates/ra_syntax/src/ast/edit.rs
+++ b/crates/ra_syntax/src/ast/edit.rs
@@ -79,7 +79,7 @@ where
79 79
80impl ast::ItemList { 80impl ast::ItemList {
81 #[must_use] 81 #[must_use]
82 pub fn append_items(&self, items: impl IntoIterator<Item = ast::ImplItem>) -> ast::ItemList { 82 pub fn append_items(&self, items: impl IntoIterator<Item = ast::AssocItem>) -> ast::ItemList {
83 let mut res = self.clone(); 83 let mut res = self.clone();
84 if !self.syntax().text().contains_char('\n') { 84 if !self.syntax().text().contains_char('\n') {
85 res = make_multiline(res); 85 res = make_multiline(res);
@@ -89,8 +89,8 @@ impl ast::ItemList {
89 } 89 }
90 90
91 #[must_use] 91 #[must_use]
92 pub fn append_item(&self, item: ast::ImplItem) -> ast::ItemList { 92 pub fn append_item(&self, item: ast::AssocItem) -> ast::ItemList {
93 let (indent, position) = match self.impl_items().last() { 93 let (indent, position) = match self.assoc_items().last() {
94 Some(it) => ( 94 Some(it) => (
95 leading_indent(it.syntax()).unwrap_or_default().to_string(), 95 leading_indent(it.syntax()).unwrap_or_default().to_string(),
96 InsertPosition::After(it.syntax().clone().into()), 96 InsertPosition::After(it.syntax().clone().into()),