From ba71f05438a93991aff6970488a720c90774d35b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 18:10:07 +0200 Subject: fmt --- crates/ra_ide/src/completion/complete_trait_impl.rs | 7 +++---- crates/ra_syntax/src/parsing/text_tree_sink.rs | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'crates') diff --git a/crates/ra_ide/src/completion/complete_trait_impl.rs b/crates/ra_ide/src/completion/complete_trait_impl.rs index 88679f3bd..87221d964 100644 --- a/crates/ra_ide/src/completion/complete_trait_impl.rs +++ b/crates/ra_ide/src/completion/complete_trait_impl.rs @@ -106,10 +106,9 @@ pub(crate) fn complete_trait_impl(acc: &mut Completions, ctx: &CompletionContext fn completion_match(ctx: &CompletionContext) -> Option<(SyntaxNode, ImplDef)> { let (trigger, impl_def_offset) = ctx.token.ancestors().find_map(|p| match p.kind() { - SyntaxKind::FN - | SyntaxKind::TYPE_ALIAS - | SyntaxKind::CONST - | SyntaxKind::BLOCK_EXPR => Some((p, 2)), + SyntaxKind::FN | SyntaxKind::TYPE_ALIAS | SyntaxKind::CONST | SyntaxKind::BLOCK_EXPR => { + Some((p, 2)) + } SyntaxKind::NAME_REF => Some((p, 5)), _ => None, })?; diff --git a/crates/ra_syntax/src/parsing/text_tree_sink.rs b/crates/ra_syntax/src/parsing/text_tree_sink.rs index f7edd86ce..95581a84b 100644 --- a/crates/ra_syntax/src/parsing/text_tree_sink.rs +++ b/crates/ra_syntax/src/parsing/text_tree_sink.rs @@ -146,8 +146,8 @@ fn n_attached_trivias<'a>( trivias: impl Iterator, ) -> usize { match kind { - MACRO_CALL | CONST | TYPE_ALIAS | STRUCT | ENUM | VARIANT | FN | TRAIT_DEF - | MODULE | RECORD_FIELD | STATIC => { + MACRO_CALL | CONST | TYPE_ALIAS | STRUCT | ENUM | VARIANT | FN | TRAIT_DEF | MODULE + | RECORD_FIELD | STATIC => { let mut res = 0; let mut trivias = trivias.enumerate().peekable(); -- cgit v1.2.3