modernize some code

This commit is contained in:
Aleksey Kladov 2018-12-06 20:42:03 +03:00
parent 25cf2349ab
commit 49324ee566
3 changed files with 7 additions and 18 deletions

View file

@ -1,12 +1,9 @@
extern crate difference; use std::fmt;
extern crate itertools;
extern crate text_unit;
use itertools::Itertools; use itertools::Itertools;
use std::fmt;
use text_unit::{TextRange, TextUnit}; use text_unit::{TextRange, TextUnit};
pub use self::difference::Changeset as __Changeset; pub use difference::Changeset as __Changeset;
pub const CURSOR_MARKER: &str = "<|>"; pub const CURSOR_MARKER: &str = "<|>";

View file

@ -1,7 +1,3 @@
extern crate failure;
extern crate itertools;
extern crate teraron;
use std::{ use std::{
path::{Path, PathBuf}, path::{Path, PathBuf},
process::{Command, Stdio}, process::{Command, Stdio},
@ -12,7 +8,7 @@ use itertools::Itertools;
pub use teraron::{Mode, Overwrite, Verify}; pub use teraron::{Mode, Overwrite, Verify};
pub type Result<T> = ::std::result::Result<T, failure::Error>; pub type Result<T> = std::result::Result<T, failure::Error>;
pub const GRAMMAR: &str = "crates/ra_syntax/src/grammar.ron"; pub const GRAMMAR: &str = "crates/ra_syntax/src/grammar.ron";
pub const SYNTAX_KINDS: &str = "crates/ra_syntax/src/syntax_kinds/generated.rs.tera"; pub const SYNTAX_KINDS: &str = "crates/ra_syntax/src/syntax_kinds/generated.rs.tera";

View file

@ -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::{ use std::{
collections::HashMap, collections::HashMap,
fs, fs,
path::{Path, PathBuf}, path::{Path, PathBuf},
}; };
use clap::{App, Arg, SubCommand};
use failure::bail;
use tools::{collect_tests, generate, run, run_rustfmt, Mode, Overwrite, Result, Test, Verify}; use tools::{collect_tests, generate, run, run_rustfmt, Mode, Overwrite, Result, Test, Verify};
const GRAMMAR_DIR: &str = "./crates/ra_syntax/src/grammar"; const GRAMMAR_DIR: &str = "./crates/ra_syntax/src/grammar";