aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-12-06 17:42:03 +0000
committerAleksey Kladov <[email protected]>2018-12-06 17:42:03 +0000
commit49324ee5669c5aad2b43a04d9d2c877b989ddc46 (patch)
treeb2f5b17757c4780aa6b1163a2a09344ddba48402 /crates
parent25cf2349ab83cde55191f794a37adf9f284887bf (diff)
modernize some code
Diffstat (limited to 'crates')
-rw-r--r--crates/test_utils/src/lib.rs7
-rw-r--r--crates/tools/src/lib.rs6
-rw-r--r--crates/tools/src/main.rs12
3 files changed, 7 insertions, 18 deletions
diff --git a/crates/test_utils/src/lib.rs b/crates/test_utils/src/lib.rs
index d9fbb9b5b..e72ec9c47 100644
--- a/crates/test_utils/src/lib.rs
+++ b/crates/test_utils/src/lib.rs
@@ -1,12 +1,9 @@
1extern crate difference; 1use std::fmt;
2extern crate itertools;
3extern crate text_unit;
4 2
5use itertools::Itertools; 3use itertools::Itertools;
6use std::fmt;
7use text_unit::{TextRange, TextUnit}; 4use text_unit::{TextRange, TextUnit};
8 5
9pub use self::difference::Changeset as __Changeset; 6pub use difference::Changeset as __Changeset;
10 7
11pub const CURSOR_MARKER: &str = "<|>"; 8pub const CURSOR_MARKER: &str = "<|>";
12 9
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 @@
1extern crate failure;
2extern crate itertools;
3extern crate teraron;
4
5use std::{ 1use std::{
6 path::{Path, PathBuf}, 2 path::{Path, PathBuf},
7 process::{Command, Stdio}, 3 process::{Command, Stdio},
@@ -12,7 +8,7 @@ use itertools::Itertools;
12 8
13pub use teraron::{Mode, Overwrite, Verify}; 9pub use teraron::{Mode, Overwrite, Verify};
14 10
15pub type Result<T> = ::std::result::Result<T, failure::Error>; 11pub type Result<T> = std::result::Result<T, failure::Error>;
16 12
17pub const GRAMMAR: &str = "crates/ra_syntax/src/grammar.ron"; 13pub const GRAMMAR: &str = "crates/ra_syntax/src/grammar.ron";
18pub const SYNTAX_KINDS: &str = "crates/ra_syntax/src/syntax_kinds/generated.rs.tera"; 14pub 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 @@
1extern crate clap;
2extern crate failure;
3extern crate teraron;
4extern crate tools;
5extern crate walkdir;
6
7use clap::{App, Arg, SubCommand};
8use failure::bail;
9use std::{ 1use std::{
10 collections::HashMap, 2 collections::HashMap,
11 fs, 3 fs,
12 path::{Path, PathBuf}, 4 path::{Path, PathBuf},
13}; 5};
6
7use clap::{App, Arg, SubCommand};
8use failure::bail;
9
14use tools::{collect_tests, generate, run, run_rustfmt, Mode, Overwrite, Result, Test, Verify}; 10use tools::{collect_tests, generate, run, run_rustfmt, Mode, Overwrite, Result, Test, Verify};
15 11
16const GRAMMAR_DIR: &str = "./crates/ra_syntax/src/grammar"; 12const GRAMMAR_DIR: &str = "./crates/ra_syntax/src/grammar";