Skip to content

Commit aa64a84

Browse files
committed
Cleanups
1 parent ce44547 commit aa64a84

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

crates/ra_assists/src/assists/auto_import.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use crate::{
99
assist_ctx::{ActionBuilder, Assist, AssistCtx},
1010
auto_import_text_edit, AssistId,
1111
};
12+
use std::collections::BTreeSet;
1213

1314
// Assist: auto_import
1415
//
@@ -60,7 +61,8 @@ pub(crate) fn auto_import(ctx: AssistCtx) -> Option<Assist> {
6061
.filter_map(|module_def| module_with_name_to_import.find_use_path(ctx.db, module_def))
6162
.filter(|use_path| !use_path.segments.is_empty())
6263
.take(20)
63-
.collect::<std::collections::BTreeSet<_>>();
64+
.collect::<BTreeSet<_>>();
65+
6466
if proposed_imports.is_empty() {
6567
return None;
6668
}
@@ -82,9 +84,10 @@ fn import_to_action(import: ModPath, position: &SyntaxNode, anchor: &SyntaxNode)
8284

8385
#[cfg(test)]
8486
mod tests {
85-
use super::*;
8687
use crate::helpers::{check_assist, check_assist_not_applicable};
8788

89+
use super::*;
90+
8891
#[test]
8992
fn applicable_when_found_an_import() {
9093
check_assist(

0 commit comments

Comments
 (0)