From 49324ee5669c5aad2b43a04d9d2c877b989ddc46 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 6 Dec 2018 20:42:03 +0300 Subject: modernize some code --- crates/tools/src/lib.rs | 6 +----- crates/tools/src/main.rs | 12 ++++-------- 2 files changed, 5 insertions(+), 13 deletions(-) (limited to 'crates/tools/src') diff --git a/crates/tools/src/lib.rs b/crates/tools/src/lib.rs index 4ff783c50..c2123db99 100644 --- a/crates/tools/src/lib.rs +++ b/crates/tools/src/lib.rs @@ -1,7 +1,3 @@ -extern crate failure; -extern crate itertools; -extern crate teraron; - use std::{ path::{Path, PathBuf}, process::{Command, Stdio}, @@ -12,7 +8,7 @@ use itertools::Itertools; pub use teraron::{Mode, Overwrite, Verify}; -pub type Result = ::std::result::Result; +pub type Result = std::result::Result; pub const GRAMMAR: &str = "crates/ra_syntax/src/grammar.ron"; pub const SYNTAX_KINDS: &str = "crates/ra_syntax/src/syntax_kinds/generated.rs.tera"; diff --git a/crates/tools/src/main.rs b/crates/tools/src/main.rs index dc623a464..7bd4a2d09 100644 --- a/crates/tools/src/main.rs +++ b/crates/tools/src/main.rs @@ -1,16 +1,12 @@ -extern crate clap; -extern crate failure; -extern crate teraron; -extern crate tools; -extern crate walkdir; - -use clap::{App, Arg, SubCommand}; -use failure::bail; use std::{ collections::HashMap, fs, path::{Path, PathBuf}, }; + +use clap::{App, Arg, SubCommand}; +use failure::bail; + use tools::{collect_tests, generate, run, run_rustfmt, Mode, Overwrite, Result, Test, Verify}; const GRAMMAR_DIR: &str = "./crates/ra_syntax/src/grammar"; -- cgit v1.2.3