From c0befb46707891bdc156dbd147355dda240800d1 Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Sun, 26 Mar 2023 20:02:45 +0530 Subject: [PATCH] Use `wild::args()` and add `wild` as a dependency (#3739) --- Cargo.lock | 10 ++++++++++ crates/ruff_cli/Cargo.toml | 1 + crates/ruff_cli/src/bin/ruff.rs | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 12f1c26b1153e..36287f950793e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2104,6 +2104,7 @@ dependencies = [ "tikv-jemallocator", "ureq", "walkdir", + "wild", ] [[package]] @@ -3272,6 +3273,15 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17882f045410753661207383517a6f62ec3dbeb6a4ed2acce01f0728238d1983" +[[package]] +name = "wild" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05b116685a6be0c52f5a103334cbff26db643826c7b3735fc0a3ba9871310a74" +dependencies = [ + "glob", +] + [[package]] name = "winapi" version = "0.3.9" diff --git a/crates/ruff_cli/Cargo.toml b/crates/ruff_cli/Cargo.toml index 9de99eb2685ec..2cfbbde827196 100644 --- a/crates/ruff_cli/Cargo.toml +++ b/crates/ruff_cli/Cargo.toml @@ -56,6 +56,7 @@ similar = { workspace = true } strum = { workspace = true, features = [] } textwrap = { workspace = true } walkdir = { version = "2.3.2" } +wild = { version = "2" } [dev-dependencies] assert_cmd = { version = "2.0.8" } diff --git a/crates/ruff_cli/src/bin/ruff.rs b/crates/ruff_cli/src/bin/ruff.rs index bd2f535fa40d5..3a00d1d93d873 100644 --- a/crates/ruff_cli/src/bin/ruff.rs +++ b/crates/ruff_cli/src/bin/ruff.rs @@ -23,7 +23,7 @@ static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; pub fn main() -> ExitCode { - let mut args: Vec<_> = std::env::args().collect(); + let mut args: Vec<_> = wild::args().collect(); // Clap doesn't support default subcommands but we want to run `check` by // default for convenience and backwards-compatibility, so we just