diff options
Diffstat (limited to 'crates/ra_assists/src/ast_editor.rs')
-rw-r--r-- | crates/ra_assists/src/ast_editor.rs | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/crates/ra_assists/src/ast_editor.rs b/crates/ra_assists/src/ast_editor.rs index 54849b7b0..69abf28a1 100644 --- a/crates/ra_assists/src/ast_editor.rs +++ b/crates/ra_assists/src/ast_editor.rs | |||
@@ -51,18 +51,3 @@ impl<N: AstNode> AstEditor<N> { | |||
51 | N::cast(new_syntax).unwrap() | 51 | N::cast(new_syntax).unwrap() |
52 | } | 52 | } |
53 | } | 53 | } |
54 | |||
55 | impl AstEditor<ast::TypeParam> { | ||
56 | pub fn remove_bounds(&mut self) -> &mut Self { | ||
57 | let colon = match self.ast.colon_token() { | ||
58 | Some(it) => it, | ||
59 | None => return self, | ||
60 | }; | ||
61 | let end = match self.ast.type_bound_list() { | ||
62 | Some(it) => it.syntax().clone().into(), | ||
63 | None => colon.clone().into(), | ||
64 | }; | ||
65 | self.ast = self.replace_children(RangeInclusive::new(colon.into(), end), iter::empty()); | ||
66 | self | ||
67 | } | ||
68 | } | ||