From 7020167aa23e9125ac1a58fe2e217d1a92140745 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 20 Nov 2019 09:47:14 +0300 Subject: Cleanup imports --- xtask/Cargo.toml | 3 +++ xtask/src/main.rs | 7 +++---- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'xtask') diff --git a/xtask/Cargo.toml b/xtask/Cargo.toml index 77b9ae2b4..65cabf005 100644 --- a/xtask/Cargo.toml +++ b/xtask/Cargo.toml @@ -5,6 +5,9 @@ version = "0.1.0" authors = ["rust-analyzer developers"] publish = false +[lib] +doctest = false + [dependencies] walkdir = "2.1.3" pico-args = "0.3.0" 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 @@ //! `.cargo/config`. mod help; +use std::{env, fmt::Write, path::PathBuf, str}; + use anyhow::Context; -use core::fmt::Write; -use core::str; use pico_args::Arguments; -use std::{env, path::PathBuf}; use xtask::{ codegen::{self, Mode}, install_pre_commit_hook, reformat_staged_files, run, run_clippy, run_fuzzer, run_rustfmt, @@ -37,7 +36,7 @@ struct ServerOpt { } 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(); } -- cgit v1.2.3 From ad2b6cad48dc336011c9fb24ba87b318b796b916 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 20 Nov 2019 23:27:03 +0300 Subject: Remove npm.cmd I *think* this is more correct --- xtask/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xtask') diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 4b1f0c887..c97bfec97 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -173,7 +173,7 @@ fn fix_path_for_mac() -> Result<()> { fn install_client(ClientOpt::VsCode: ClientOpt) -> Result<()> { let npm_version = Cmd { unix: r"npm --version", - windows: r"cmd.exe /c npm.cmd --version", + windows: r"cmd.exe /c npm --version", work_dir: "./editors/code", } .run(); @@ -182,10 +182,10 @@ fn install_client(ClientOpt::VsCode: ClientOpt) -> Result<()> { eprintln!("\nERROR: `npm --version` failed, `npm` is required to build the VS Code plugin") } - Cmd { unix: r"npm ci", windows: r"cmd.exe /c npm.cmd ci", work_dir: "./editors/code" }.run()?; + Cmd { unix: r"npm ci", windows: r"cmd.exe /c npm ci", work_dir: "./editors/code" }.run()?; Cmd { unix: r"npm run package --scripts-prepend-node-path", - windows: r"cmd.exe /c npm.cmd run package", + windows: r"cmd.exe /c npm run package", work_dir: "./editors/code", } .run()?; -- cgit v1.2.3