aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/ast/edit.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-04-10 14:53:09 +0100
committerAleksey Kladov <[email protected]>2020-04-10 15:10:28 +0100
commit4560fe2abffde05e6ceb084e6d42207e0ce84b68 (patch)
tree9aa66654c1c3918e112b47246a29f197ea5b233a /crates/ra_syntax/src/ast/edit.rs
parent8d71a6bf0ca51ae099a5b470afdb957bca321441 (diff)
Generate only minimal set of ineresting tokens
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 7e14349d2..9e5411ee5 100644
--- a/crates/ra_syntax/src/ast/edit.rs
+++ b/crates/ra_syntax/src/ast/edit.rs
@@ -189,15 +189,15 @@ impl ast::RecordFieldList {
189impl ast::TypeParam { 189impl ast::TypeParam {
190 #[must_use] 190 #[must_use]
191 pub fn remove_bounds(&self) -> ast::TypeParam { 191 pub fn remove_bounds(&self) -> ast::TypeParam {
192 let colon = match self.colon() { 192 let colon = match self.colon_token() {
193 Some(it) => it, 193 Some(it) => it,
194 None => return self.clone(), 194 None => return self.clone(),
195 }; 195 };
196 let end = match self.type_bound_list() { 196 let end = match self.type_bound_list() {
197 Some(it) => it.syntax().clone().into(), 197 Some(it) => it.syntax().clone().into(),
198 None => colon.syntax().clone().into(), 198 None => colon.clone().into(),
199 }; 199 };
200 self.replace_children(colon.syntax().clone().into()..=end, iter::empty()) 200 self.replace_children(colon.into()..=end, iter::empty())
201 } 201 }
202} 202}
203 203