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_tools/src/bin/pre-commit.rs | 2 +- crates/ra_tools/src/lib.rs | 6 +++--- crates/ra_tools/src/main.rs | 6 +++--- crates/ra_tools/tests/cli.rs | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'crates/ra_tools') diff --git a/crates/ra_tools/src/bin/pre-commit.rs b/crates/ra_tools/src/bin/pre-commit.rs index 95bb55cae..a628f64b2 100644 --- a/crates/ra_tools/src/bin/pre-commit.rs +++ b/crates/ra_tools/src/bin/pre-commit.rs @@ -1,6 +1,6 @@ use std::process::Command; -use ra_tools::{Result, run_rustfmt, run, project_root, Overwrite}; +use ra_tools::{project_root, run, run_rustfmt, Overwrite, Result}; fn main() -> Result<()> { run_rustfmt(Overwrite)?; diff --git a/crates/ra_tools/src/lib.rs b/crates/ra_tools/src/lib.rs index 821209567..d56e0d2ef 100644 --- a/crates/ra_tools/src/lib.rs +++ b/crates/ra_tools/src/lib.rs @@ -1,10 +1,10 @@ use std::{ - fs, collections::HashMap, + error::Error, + fs, + io::{Error as IoError, ErrorKind}, path::{Path, PathBuf}, process::{Command, Output, Stdio}, - io::{Error as IoError, ErrorKind}, - error::Error }; use itertools::Itertools; diff --git a/crates/ra_tools/src/main.rs b/crates/ra_tools/src/main.rs index 846e0223e..7ed592f71 100644 --- a/crates/ra_tools/src/main.rs +++ b/crates/ra_tools/src/main.rs @@ -1,10 +1,10 @@ use clap::{App, SubCommand}; use core::str; use ra_tools::{ - generate, gen_tests, install_format_hook, run, run_with_output, run_rustfmt, - Overwrite, Result, run_fuzzer, run_clippy, + gen_tests, generate, install_format_hook, run, run_clippy, run_fuzzer, run_rustfmt, + run_with_output, Overwrite, Result, }; -use std::{path::{PathBuf}, env}; +use std::{env, path::PathBuf}; fn main() -> Result<()> { let matches = App::new("tasks") diff --git a/crates/ra_tools/tests/cli.rs b/crates/ra_tools/tests/cli.rs index 83640218f..ae0eb337d 100644 --- a/crates/ra_tools/tests/cli.rs +++ b/crates/ra_tools/tests/cli.rs @@ -1,6 +1,6 @@ use walkdir::WalkDir; -use ra_tools::{generate, gen_tests, run_rustfmt, Verify, project_root}; +use ra_tools::{gen_tests, generate, project_root, run_rustfmt, Verify}; #[test] fn generated_grammar_is_fresh() { -- cgit v1.2.3