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/diagnostics.rs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'crates/ra_ide_api/src/diagnostics.rs') diff --git a/crates/ra_ide_api/src/diagnostics.rs b/crates/ra_ide_api/src/diagnostics.rs index 35b3d77df..9ab455b0e 100644 --- a/crates/ra_ide_api/src/diagnostics.rs +++ b/crates/ra_ide_api/src/diagnostics.rs @@ -1,17 +1,20 @@ use std::cell::RefCell; +use hir::{ + diagnostics::{Diagnostic as _, DiagnosticSink}, + source_binder, +}; use itertools::Itertools; -use hir::{source_binder, diagnostics::{Diagnostic as _, DiagnosticSink}}; +use ra_assists::ast_editor::{AstBuilder, AstEditor}; use ra_db::SourceDatabase; +use ra_prof::profile; use ra_syntax::{ - T, Location, TextRange, SyntaxNode, - ast::{self, AstNode, NamedFieldList, NamedField}, + ast::{self, AstNode, NamedField, NamedFieldList}, + Location, SyntaxNode, TextRange, T, }; -use ra_assists::ast_editor::{AstEditor, AstBuilder}; use ra_text_edit::{TextEdit, TextEditBuilder}; -use ra_prof::profile; -use crate::{Diagnostic, FileId, FileSystemEdit, SourceChange, SourceFileEdit, db::RootDatabase}; +use crate::{db::RootDatabase, Diagnostic, FileId, FileSystemEdit, SourceChange, SourceFileEdit}; #[derive(Debug, Copy, Clone)] pub enum Severity { @@ -170,9 +173,9 @@ fn check_struct_shorthand_initialization( #[cfg(test)] mod tests { - use test_utils::assert_eq_text; use insta::assert_debug_snapshot_matches; use ra_syntax::SourceFile; + use test_utils::assert_eq_text; use crate::mock_analysis::single_file; -- cgit v1.2.3