8772: minor: remove dead code r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2021-05-08 20:29:03 +00:00 committed by GitHub
commit 4e33cbc6ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -665,18 +665,8 @@ pub trait AstNodeEdit: AstNode + Clone + Sized {
#[must_use]
fn replace_descendant<D: AstNode>(&self, old: D, new: D) -> Self {
self.replace_descendants(iter::once((old, new)))
}
#[must_use]
fn replace_descendants<D: AstNode>(
&self,
replacement_map: impl IntoIterator<Item = (D, D)>,
) -> Self {
let mut rewriter = SyntaxRewriter::default();
for (from, to) in replacement_map {
rewriter.replace(from.syntax(), to.syntax())
}
rewriter.replace(old.syntax(), new.syntax());
rewriter.rewrite_ast(self)
}
fn indent_level(&self) -> IndentLevel {