9900: internal: remove one more usage of old editing API. r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2021-08-14 17:17:51 +00:00 committed by GitHub
commit 1e0d20366f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 55 deletions

View file

@ -194,10 +194,10 @@ fn get_transformed_assoc_item(
);
transform.apply(assoc_item.syntax());
Some(match assoc_item {
ast::AssocItem::Fn(func) => ast::AssocItem::Fn(edit::remove_attrs_and_docs(&func)),
_ => assoc_item,
})
if let ast::AssocItem::Fn(func) = &assoc_item {
edit::remove_attrs_and_docs(func)
}
Some(assoc_item)
}
fn add_type_alias_impl(
@ -253,7 +253,7 @@ fn add_const_impl(
}
fn make_const_compl_syntax(const_: &ast::Const) -> String {
let const_ = edit::remove_attrs_and_docs(const_);
edit::remove_attrs_and_docs(const_);
let const_start = const_.syntax().text_range().start();
let const_end = const_.syntax().text_range().end();