From cff0fba5e5fb4a5de470bf923b93b0bdd89d9efb Mon Sep 17 00:00:00 2001 From: Dmitry Date: Sun, 9 Aug 2020 23:47:02 +0700 Subject: apply format --- crates/ra_ide/src/completion.rs | 3 ++- crates/ra_ide/src/completion/complete_attribute.rs | 11 +++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'crates/ra_ide/src') diff --git a/crates/ra_ide/src/completion.rs b/crates/ra_ide/src/completion.rs index 7b96902fb..a537b68b1 100644 --- a/crates/ra_ide/src/completion.rs +++ b/crates/ra_ide/src/completion.rs @@ -21,12 +21,13 @@ mod complete_trait_impl; mod unstable_feature_descriptor; use ra_ide_db::RootDatabase; +#[rustfmt::skip] use crate::{ completion::{ completion_context::CompletionContext, completion_item::{CompletionKind, Completions}, - //TODO: rework + //TODO: cyclic imports caused by xtask generation, this should be better unstable_feature_descriptor::UNSTABLE_FEATURE_DESCRIPTOR, complete_attribute::LintCompletion, }, diff --git a/crates/ra_ide/src/completion/complete_attribute.rs b/crates/ra_ide/src/completion/complete_attribute.rs index 50b0b3ff6..2161cdfd2 100644 --- a/crates/ra_ide/src/completion/complete_attribute.rs +++ b/crates/ra_ide/src/completion/complete_attribute.rs @@ -19,9 +19,7 @@ pub(super) fn complete_attribute(acc: &mut Completions, ctx: &CompletionContext) (Some(path), Some(token_tree)) if path.to_string() == "derive" => { complete_derive(acc, ctx, token_tree) } - (Some(path), Some(token_tree)) - if path.to_string() == "feature" => - { + (Some(path), Some(token_tree)) if path.to_string() == "feature" => { complete_lint(acc, ctx, token_tree, UNSTABLE_FEATURE_DESCRIPTOR); } (Some(path), Some(token_tree)) @@ -169,7 +167,12 @@ fn complete_derive(acc: &mut Completions, ctx: &CompletionContext, derive_input: } } -fn complete_lint(acc: &mut Completions, ctx: &CompletionContext, derive_input: ast::TokenTree, lints_completions: &[LintCompletion]) { +fn complete_lint( + acc: &mut Completions, + ctx: &CompletionContext, + derive_input: ast::TokenTree, + lints_completions: &[LintCompletion], +) { if let Ok(existing_lints) = parse_comma_sep_input(derive_input) { for lint_completion in lints_completions .into_iter() -- cgit v1.2.3