Cleanup **Move Guard** assist

This commit is contained in:
Aleksey Kladov 2020-08-13 10:32:03 +02:00
parent 982b299252
commit 26b98b07aa
3 changed files with 112 additions and 117 deletions

View file

@ -601,6 +601,9 @@ pub trait AstNodeEdit: AstNode + Clone + Sized {
}
rewriter.rewrite_ast(self)
}
fn indent_level(&self) -> IndentLevel {
IndentLevel::from_node(self.syntax())
}
#[must_use]
fn indent(&self, level: IndentLevel) -> Self {
Self::cast(level.increase_indent(self.syntax().clone())).unwrap()