From 1834bae5b86c54ed9dece26e82436919d59e6cb7 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 4 Jul 2019 23:05:17 +0300 Subject: allow rustfmt to reorder imports This wasn't a right decision in the first place, the feature flag was broken in the last rustfmt release, and syntax highlighting of imports is more important anyway --- crates/ra_ide_api/src/references.rs | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) (limited to 'crates/ra_ide_api/src/references.rs') diff --git a/crates/ra_ide_api/src/references.rs b/crates/ra_ide_api/src/references.rs index 12cdc6a6d..766c0ad74 100644 --- a/crates/ra_ide_api/src/references.rs +++ b/crates/ra_ide_api/src/references.rs @@ -1,22 +1,11 @@ +use hir::{source_binder, Either, ModuleSource}; +use ra_db::SourceDatabase; +use ra_syntax::{algo::find_node_at_offset, ast, AstNode, SourceFile, SyntaxNode}; use relative_path::{RelativePath, RelativePathBuf}; -use hir::{ModuleSource, source_binder, Either}; -use ra_db::{SourceDatabase}; -use ra_syntax::{ - AstNode, SyntaxNode, SourceFile, - ast, - algo::find_node_at_offset, -}; use crate::{ - db::RootDatabase, - FilePosition, - FileRange, - FileId, - NavigationTarget, - FileSystemEdit, - SourceChange, - SourceFileEdit, - TextRange, + db::RootDatabase, FileId, FilePosition, FileRange, FileSystemEdit, NavigationTarget, + SourceChange, SourceFileEdit, TextRange, }; #[derive(Debug, Clone)] @@ -210,13 +199,12 @@ fn rename_reference( #[cfg(test)] mod tests { + use crate::{ + mock_analysis::analysis_and_position, mock_analysis::single_file_with_position, FileId, + ReferenceSearchResult, + }; use insta::assert_debug_snapshot_matches; use test_utils::assert_eq_text; - use crate::{ - mock_analysis::single_file_with_position, - mock_analysis::analysis_and_position, - FileId, ReferenceSearchResult -}; #[test] fn test_find_all_refs_for_local() { -- cgit v1.2.3