diff --git a/crates/tools/src/lib.rs b/crates/tools/src/lib.rs index 7c5410d3c786..44d3363e169d 100644 --- a/crates/tools/src/lib.rs +++ b/crates/tools/src/lib.rs @@ -1,14 +1,12 @@ -extern crate itertools; extern crate failure; +extern crate itertools; extern crate teraron; -use std::{ - path::{Path, PathBuf}, -}; +use std::path::{Path, PathBuf}; use itertools::Itertools; -pub use teraron::{Mode, Verify, Overwrite}; +pub use teraron::{Mode, Overwrite, Verify}; pub type Result = ::std::result::Result; @@ -60,16 +58,8 @@ pub fn generate(mode: Mode) -> Result<()> { let grammar = project_root().join(GRAMMAR); let syntax_kinds = project_root().join(SYNTAX_KINDS); let ast = project_root().join(AST); - teraron::generate( - &syntax_kinds, - &grammar, - mode, - )?; - teraron::generate( - &ast, - &grammar, - mode, - )?; + teraron::generate(&syntax_kinds, &grammar, mode)?; + teraron::generate(&ast, &grammar, mode)?; Ok(()) } diff --git a/crates/tools/src/main.rs b/crates/tools/src/main.rs index fdb443690bd9..449c391fb41a 100644 --- a/crates/tools/src/main.rs +++ b/crates/tools/src/main.rs @@ -1,9 +1,9 @@ extern crate clap; #[macro_use] extern crate failure; +extern crate teraron; extern crate tools; extern crate walkdir; -extern crate teraron; use clap::{App, Arg, SubCommand}; use std::{ @@ -12,9 +12,7 @@ use std::{ path::{Path, PathBuf}, process::Command, }; -use tools::{ - collect_tests, Result, Test, generate, Mode, Overwrite, Verify, -}; +use tools::{collect_tests, generate, Mode, Overwrite, Result, Test, Verify}; const GRAMMAR_DIR: &str = "./crates/ra_syntax/src/grammar"; const INLINE_TESTS_DIR: &str = "./crates/ra_syntax/tests/data/parser/inline"; diff --git a/crates/tools/tests/cli.rs b/crates/tools/tests/cli.rs index 5de52fc2b8df..ecffc1c56f1e 100644 --- a/crates/tools/tests/cli.rs +++ b/crates/tools/tests/cli.rs @@ -1,8 +1,6 @@ extern crate tools; -use tools::{ - generate, Verify -}; +use tools::{generate, Verify}; #[test] fn verify_template_generation() {