Skip to content

Commit 2b2b9f8

Browse files
committed
Formatting
1 parent b5e87ac commit 2b2b9f8

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

crates/ide-completion/src/completions/env_vars.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ use hir::Semantics;
33
use ide_db::{syntax_helpers::node_ext::macro_call_for_string_token, RootDatabase};
44
use syntax::ast::{self, IsString};
55

6-
use crate::{context::CompletionContext, CompletionItem, CompletionItemKind, completions::Completions};
6+
use crate::{
7+
completions::Completions, context::CompletionContext, CompletionItem, CompletionItemKind,
8+
};
79

810
const CARGO_DEFINED_VARS: &[(&str, &str)] = &[
911
("CARGO","Path to the cargo binary performing the build"),
@@ -44,10 +46,7 @@ pub(crate) fn complete_cargo_env_vars(
4446
Some(())
4547
}
4648

47-
fn guard_env_macro(
48-
string: &ast::String,
49-
semantics: &Semantics<'_, RootDatabase>,
50-
) -> Option<()> {
49+
fn guard_env_macro(string: &ast::String, semantics: &Semantics<'_, RootDatabase>) -> Option<()> {
5150
let call = macro_call_for_string_token(string)?;
5251
let name = call.path()?.segment()?.name_ref()?;
5352
let makro = semantics.resolve_macro_call(&call)?;

crates/ide-db/src/syntax_helpers/format_string.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
//! Tools to work with format string literals for the `format_args!` family of macros.
2+
use crate::syntax_helpers::node_ext::macro_call_for_string_token;
23
use syntax::{
34
ast::{self, IsString},
45
TextRange, TextSize,
56
};
6-
use crate::syntax_helpers::node_ext::macro_call_for_string_token;
77

88
pub fn is_format_string(string: &ast::String) -> bool {
99
// Check if `string` is a format string argument of a macro invocation.

0 commit comments

Comments
 (0)