diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-11-20 06:51:40 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-20 06:51:40 +0000 |
commit | 4340d9b0e435bde11c0cc79e9f284856a836ccdc (patch) | |
tree | ea16c683f1e4c803dec946516c5f40ff848c66aa /xtask/src | |
parent | 4dae39a609fb58b42cbe152e66d30fe6471a34d7 (diff) | |
parent | 7020167aa23e9125ac1a58fe2e217d1a92140745 (diff) |
Merge #2320
2320: Cleanup imports r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'xtask/src')
-rw-r--r-- | xtask/src/main.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 663e28103..4b1f0c887 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs | |||
@@ -9,11 +9,10 @@ | |||
9 | //! `.cargo/config`. | 9 | //! `.cargo/config`. |
10 | mod help; | 10 | mod help; |
11 | 11 | ||
12 | use std::{env, fmt::Write, path::PathBuf, str}; | ||
13 | |||
12 | use anyhow::Context; | 14 | use anyhow::Context; |
13 | use core::fmt::Write; | ||
14 | use core::str; | ||
15 | use pico_args::Arguments; | 15 | use pico_args::Arguments; |
16 | use std::{env, path::PathBuf}; | ||
17 | use xtask::{ | 16 | use xtask::{ |
18 | codegen::{self, Mode}, | 17 | codegen::{self, Mode}, |
19 | install_pre_commit_hook, reformat_staged_files, run, run_clippy, run_fuzzer, run_rustfmt, | 18 | install_pre_commit_hook, reformat_staged_files, run, run_clippy, run_fuzzer, run_rustfmt, |
@@ -37,7 +36,7 @@ struct ServerOpt { | |||
37 | } | 36 | } |
38 | 37 | ||
39 | fn main() -> Result<()> { | 38 | fn main() -> Result<()> { |
40 | if std::env::args().next().map(|it| it.contains("pre-commit")) == Some(true) { | 39 | if env::args().next().map(|it| it.contains("pre-commit")) == Some(true) { |
41 | return reformat_staged_files(); | 40 | return reformat_staged_files(); |
42 | } | 41 | } |
43 | 42 | ||