Skip to content

Commit

Permalink
One last rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
alanhdu committed Oct 16, 2018
1 parent 04b214e commit a21c07a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 22 deletions.
20 changes: 5 additions & 15 deletions crates/tools/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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<T> = ::std::result::Result<T, failure::Error>;

Expand Down Expand Up @@ -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(())
}

Expand Down
6 changes: 2 additions & 4 deletions crates/tools/src/main.rs
Original file line number Diff line number Diff line change
@@ -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::{
Expand All @@ -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";
Expand Down
4 changes: 1 addition & 3 deletions crates/tools/tests/cli.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
extern crate tools;

use tools::{
generate, Verify
};
use tools::{generate, Verify};

#[test]
fn verify_template_generation() {
Expand Down

0 comments on commit a21c07a

Please sign in to comment.