Skip to content

Commit 8379efd

Browse files
cargo fmt
1 parent 5f671f2 commit 8379efd

File tree

11 files changed

+23
-22
lines changed

11 files changed

+23
-22
lines changed

crates/hir-def/src/macro_expansion_tests/mod.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ use std::{iter, ops::Range, sync};
1919
use base_db::SourceDatabase;
2020
use expect_test::Expect;
2121
use hir_expand::{
22-
InFile, InFile, MacroCallKind, MacroCallKind, MacroFileId, MacroFileId, MacroFileIdExt,
23-
MacroFileIdExt, MacroKind,
22+
InFile, MacroCallKind, MacroFileId, MacroFileIdExt, MacroKind,
2423
db::ExpandDatabase,
2524
proc_macro::{ProcMacro, ProcMacroExpander, ProcMacroExpansionError, ProcMacroKind},
2625
span_map::SpanMapRef,

crates/hir-expand/src/files.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use span::{
99
use syntax::{AstNode, AstPtr, SyntaxNode, SyntaxNodePtr, SyntaxToken, TextRange, TextSize};
1010

1111
use crate::{
12-
MacroFileIdExt, MacroFileIdExt, MacroKind,
12+
MacroFileIdExt, MacroKind,
1313
db::{self, ExpandDatabase},
1414
map_node_range_up, map_node_range_up_rooted, span_for_offset,
1515
};

crates/hir/src/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,7 @@ pub use {
130130
{ModuleDefId, TraitId},
131131
},
132132
hir_expand::{
133-
ExpandResult, ExpandResult, HirFileId, HirFileId, HirFileIdExt, HirFileIdExt, MacroFileId,
134-
MacroFileId, MacroFileIdExt, MacroFileIdExt, MacroKind,
133+
ExpandResult, HirFileId, HirFileIdExt, MacroFileId, MacroFileIdExt, MacroKind,
135134
attrs::{Attr, AttrId},
136135
change::ChangeWithProcMacros,
137136
files::{

crates/ide-assists/src/handlers/convert_bool_then.rs

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ use syntax::{
1616
use crate::{
1717
AssistContext, AssistId, AssistKind, Assists,
1818
utils::{invert_boolean_expression, unwrap_trivial_block},
19-
utils::{invert_boolean_expression_legacy, unwrap_trivial_block},
2019
};
2120

2221
// Assist: convert_if_to_bool_then

crates/ide-assists/src/handlers/flip_comma.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use syntax::{
2-
AstNode, AstNode, Direction, Direction, NodeOrToken, NodeOrToken, SyntaxElement, SyntaxKind,
3-
SyntaxKind, SyntaxToken, SyntaxToken, T, T,
2+
AstNode, Direction, NodeOrToken, SyntaxKind, SyntaxToken, T,
43
algo::non_trivia_sibling,
54
ast::{self, syntax_factory::SyntaxFactory},
65
syntax_editor::SyntaxMapping,

crates/ide-assists/src/handlers/unqualify_method_call.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use ide_db::imports::insert_use::ImportScope;
22
use syntax::{
33
TextRange,
4-
ast::{self, AstNode, HasArgList, make},
5-
ast::{self, AstNode, HasArgList, prec::ExprPrecedence},
4+
ast::prec::ExprPrecedence,
5+
ast::{self, AstNode, HasArgList},
66
};
77

88
use crate::{AssistContext, AssistId, AssistKind, Assists};

crates/ide/src/syntax_highlighting.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ use hir::{HirFileIdExt, InFile, InRealFile, MacroFileIdExt, MacroKind, Name, Sem
1818
use ide_db::{FxHashMap, Ranker, RootDatabase, SymbolKind};
1919
use span::EditionedFileId;
2020
use syntax::{
21-
AstNode, AstToken, NodeOrToken, SyntaxKind::*, SyntaxNode, SyntaxToken, T, TextRange, WalkEvent,
21+
AstNode, AstToken, NodeOrToken,
22+
SyntaxKind::*,
23+
SyntaxNode, SyntaxToken, T, TextRange, WalkEvent,
24+
ast::{self, IsString},
2225
};
2326

2427
use crate::{

crates/ra-salsa/src/derived/slot.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,9 @@ where
241241
Q::cycle_fallback(db, &cycle, key)
242242
} else {
243243
// we are not a participant in this cycle
244-
debug_assert!(!cycle
245-
.participant_keys()
246-
.any(|k| k == self.database_key_index()));
244+
debug_assert!(
245+
!cycle.participant_keys().any(|k| k == self.database_key_index())
246+
);
247247
cycle.throw()
248248
}
249249
}

crates/ra-salsa/src/derived_lru/slot.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,9 @@ where
259259
Q::cycle_fallback(db, &cycle, key)
260260
} else {
261261
// we are not a participant in this cycle
262-
debug_assert!(!cycle
263-
.participant_keys()
264-
.any(|k| k == self.database_key_index()));
262+
debug_assert!(
263+
!cycle.participant_keys().any(|k| k == self.database_key_index())
264+
);
265265
cycle.throw()
266266
}
267267
}
@@ -378,10 +378,10 @@ where
378378
value: value.clone(),
379379
};
380380

381-
trace!(
382-
"{:?}: returning memoized value changed at {:?}",
383-
self, value.changed_at
384-
);
381+
trace!(
382+
"{:?}: returning memoized value changed at {:?}",
383+
self, value.changed_at
384+
);
385385

386386
ProbeState::UpToDate(value)
387387
} else {

crates/rust-analyzer/src/handlers/request.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ use crate::{
3838
hack_recover_crate_name,
3939
line_index::LineEndings,
4040
lsp::{
41-
completion_item_hash,
41+
LspError, completion_item_hash,
4242
ext::{
4343
InternalTestingFetchConfigOption, InternalTestingFetchConfigParams,
4444
InternalTestingFetchConfigResponse,

crates/rust-analyzer/src/lsp/to_proto.rs

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ use crate::{
3737
target_spec::{CargoTargetSpec, TargetSpec},
3838
};
3939

40+
use super::LspError;
41+
4042
pub(crate) fn position(line_index: &LineIndex, offset: TextSize) -> lsp_types::Position {
4143
let line_col = line_index.index.line_col(offset);
4244
match line_index.encoding {

0 commit comments

Comments
 (0)