mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-26 11:55:04 +00:00
Cleanup imports
This commit is contained in:
parent
36e3fc9d54
commit
7020167aa2
2 changed files with 6 additions and 4 deletions
|
@ -5,6 +5,9 @@ version = "0.1.0"
|
||||||
authors = ["rust-analyzer developers"]
|
authors = ["rust-analyzer developers"]
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
doctest = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
walkdir = "2.1.3"
|
walkdir = "2.1.3"
|
||||||
pico-args = "0.3.0"
|
pico-args = "0.3.0"
|
||||||
|
|
|
@ -9,11 +9,10 @@
|
||||||
//! `.cargo/config`.
|
//! `.cargo/config`.
|
||||||
mod help;
|
mod help;
|
||||||
|
|
||||||
|
use std::{env, fmt::Write, path::PathBuf, str};
|
||||||
|
|
||||||
use anyhow::Context;
|
use anyhow::Context;
|
||||||
use core::fmt::Write;
|
|
||||||
use core::str;
|
|
||||||
use pico_args::Arguments;
|
use pico_args::Arguments;
|
||||||
use std::{env, path::PathBuf};
|
|
||||||
use xtask::{
|
use xtask::{
|
||||||
codegen::{self, Mode},
|
codegen::{self, Mode},
|
||||||
install_pre_commit_hook, reformat_staged_files, run, run_clippy, run_fuzzer, run_rustfmt,
|
install_pre_commit_hook, reformat_staged_files, run, run_clippy, run_fuzzer, run_rustfmt,
|
||||||
|
@ -37,7 +36,7 @@ struct ServerOpt {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() -> Result<()> {
|
fn main() -> Result<()> {
|
||||||
if std::env::args().next().map(|it| it.contains("pre-commit")) == Some(true) {
|
if env::args().next().map(|it| it.contains("pre-commit")) == Some(true) {
|
||||||
return reformat_staged_files();
|
return reformat_staged_files();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue