about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbtwotwo <10519967+btwotwo@users.noreply.github.com>2022-10-11 19:53:22 +0200
committerbtwotwo <10519967+btwotwo@users.noreply.github.com>2022-10-11 19:53:22 +0200
commit2b2b9f8c7332314b151fd8287a8b02c34a20a5a7 (patch)
tree73fa2e94305103a6fd31e44bc130a41397e7c2a1
parentb5e87ac11177165da100b21fbc2f83736add6ac8 (diff)
downloadrust-2b2b9f8c7332314b151fd8287a8b02c34a20a5a7.tar.gz
rust-2b2b9f8c7332314b151fd8287a8b02c34a20a5a7.zip
Formatting
-rw-r--r--crates/ide-completion/src/completions/env_vars.rs9
-rw-r--r--crates/ide-db/src/syntax_helpers/format_string.rs2
2 files changed, 5 insertions, 6 deletions
diff --git a/crates/ide-completion/src/completions/env_vars.rs b/crates/ide-completion/src/completions/env_vars.rs
index d7cccf0bedc..09e95e53de6 100644
--- a/crates/ide-completion/src/completions/env_vars.rs
+++ b/crates/ide-completion/src/completions/env_vars.rs
@@ -3,7 +3,9 @@ use hir::Semantics;
 use ide_db::{syntax_helpers::node_ext::macro_call_for_string_token, RootDatabase};
 use syntax::ast::{self, IsString};
 
-use crate::{context::CompletionContext, CompletionItem, CompletionItemKind, completions::Completions};
+use crate::{
+    completions::Completions, context::CompletionContext, CompletionItem, CompletionItemKind,
+};
 
 const CARGO_DEFINED_VARS: &[(&str, &str)] = &[
     ("CARGO","Path to the cargo binary performing the build"),
@@ -44,10 +46,7 @@ pub(crate) fn complete_cargo_env_vars(
     Some(())
 }
 
-fn guard_env_macro(
-    string: &ast::String,
-    semantics: &Semantics<'_, RootDatabase>,
-) -> Option<()> {
+fn guard_env_macro(string: &ast::String, semantics: &Semantics<'_, RootDatabase>) -> Option<()> {
     let call = macro_call_for_string_token(string)?;
     let name = call.path()?.segment()?.name_ref()?;
     let makro = semantics.resolve_macro_call(&call)?;
diff --git a/crates/ide-db/src/syntax_helpers/format_string.rs b/crates/ide-db/src/syntax_helpers/format_string.rs
index caa579e322b..2d6927cee99 100644
--- a/crates/ide-db/src/syntax_helpers/format_string.rs
+++ b/crates/ide-db/src/syntax_helpers/format_string.rs
@@ -1,9 +1,9 @@
 //! Tools to work with format string literals for the `format_args!` family of macros.
+use crate::syntax_helpers::node_ext::macro_call_for_string_token;
 use syntax::{
     ast::{self, IsString},
     TextRange, TextSize,
 };
-use crate::syntax_helpers::node_ext::macro_call_for_string_token;
 
 pub fn is_format_string(string: &ast::String) -> bool {
     // Check if `string` is a format string argument of a macro invocation.