File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ fn add_missing_impl_members_inner(
151
151
ast:: ImplItem :: FnDef ( def) => ast:: ImplItem :: FnDef ( add_body ( def) ) ,
152
152
_ => it,
153
153
} )
154
- . map ( |it| edit:: strip_attrs_and_docs ( & it) ) ;
154
+ . map ( |it| edit:: remove_attrs_and_docs ( & it) ) ;
155
155
let new_impl_item_list = impl_item_list. append_items ( items) ;
156
156
let cursor_position = {
157
157
let first_new_item = new_impl_item_list. impl_items ( ) . nth ( n_existing_items) . unwrap ( ) ;
Original file line number Diff line number Diff line change @@ -193,7 +193,7 @@ fn add_const_impl(
193
193
}
194
194
195
195
fn make_const_compl_syntax ( const_ : & ast:: ConstDef ) -> String {
196
- let const_ = edit:: strip_attrs_and_docs ( const_) ;
196
+ let const_ = edit:: remove_attrs_and_docs ( const_) ;
197
197
198
198
let const_start = const_. syntax ( ) . text_range ( ) . start ( ) ;
199
199
let const_end = const_. syntax ( ) . text_range ( ) . end ( ) ;
Original file line number Diff line number Diff line change @@ -296,11 +296,11 @@ impl ast::UseTree {
296
296
}
297
297
298
298
#[ must_use]
299
- pub fn strip_attrs_and_docs < N : ast:: AttrsOwner > ( node : & N ) -> N {
300
- N :: cast ( strip_attrs_and_docs_inner ( node. syntax ( ) . clone ( ) ) ) . unwrap ( )
299
+ pub fn remove_attrs_and_docs < N : ast:: AttrsOwner > ( node : & N ) -> N {
300
+ N :: cast ( remove_attrs_and_docs_inner ( node. syntax ( ) . clone ( ) ) ) . unwrap ( )
301
301
}
302
302
303
- fn strip_attrs_and_docs_inner ( mut node : SyntaxNode ) -> SyntaxNode {
303
+ fn remove_attrs_and_docs_inner ( mut node : SyntaxNode ) -> SyntaxNode {
304
304
while let Some ( start) =
305
305
node. children_with_tokens ( ) . find ( |it| it. kind ( ) == ATTR || it. kind ( ) == COMMENT )
306
306
{
You can’t perform that action at this time.
0 commit comments