From 26b98b07aa0e4430bc872b28eadbc822cfee7b6e Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 13 Aug 2020 10:32:03 +0200 Subject: Cleanup **Move Guard** assist --- crates/syntax/src/ast/edit.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'crates/syntax') diff --git a/crates/syntax/src/ast/edit.rs b/crates/syntax/src/ast/edit.rs index 2667d9af4..190746e09 100644 --- a/crates/syntax/src/ast/edit.rs +++ b/crates/syntax/src/ast/edit.rs @@ -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() -- cgit v1.2.3