From c00f298fd26d4982e9fe092ee004facf9cef6906 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 12 Oct 2019 22:07:47 +0300 Subject: add syntax-tree based indents --- crates/ra_assists/src/assists/fill_match_arms.rs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'crates/ra_assists/src/assists') diff --git a/crates/ra_assists/src/assists/fill_match_arms.rs b/crates/ra_assists/src/assists/fill_match_arms.rs index 7335cce09..e3f30b5de 100644 --- a/crates/ra_assists/src/assists/fill_match_arms.rs +++ b/crates/ra_assists/src/assists/fill_match_arms.rs @@ -3,7 +3,7 @@ use std::iter; use hir::{db::HirDatabase, Adt, HasSource}; -use ra_syntax::ast::{self, make, AstNode, NameOwner}; +use ra_syntax::ast::{self, edit::IndentLevel, make, AstNode, NameOwner}; use crate::{Assist, AssistCtx, AssistId}; @@ -30,15 +30,19 @@ pub(crate) fn fill_match_arms(mut ctx: AssistCtx) -> Option