mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 13:48:50 +00:00
Update pico-args
This commit is contained in:
parent
79979db944
commit
b4e6939760
4 changed files with 10 additions and 10 deletions
8
Cargo.lock
generated
8
Cargo.lock
generated
|
@ -829,7 +829,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "pico-args"
|
||||
version = "0.2.0"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
|
@ -928,7 +928,7 @@ version = "0.1.0"
|
|||
dependencies = [
|
||||
"flexi_logger 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"indicatif 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pico-args 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pico-args 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ra_batch 0.1.0",
|
||||
"ra_db 0.1.0",
|
||||
"ra_hir 0.1.0",
|
||||
|
@ -1112,7 +1112,7 @@ name = "ra_tools"
|
|||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pico-args 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pico-args 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1864,7 +1864,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
"checksum paste-impl 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "4214c9e912ef61bf42b81ba9a47e8aad1b2ffaf739ab162bf96d1e011f54e6c5"
|
||||
"checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
|
||||
"checksum petgraph 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3659d1ee90221741f65dd128d9998311b0e40c5d3c23a62445938214abce4f"
|
||||
"checksum pico-args 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2fce25154205cf4360b456fd7d48994afe20663b77e3bd3d0a353a2fccf7f22c"
|
||||
"checksum pico-args 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "22e32b0f3771287ebb436130477eabf0f11f934ed036099ad548bc885e708667"
|
||||
"checksum ppv-lite86 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e3cbf9f658cdb5000fcf6f362b8ea2ba154b9f146a61c7a20d647034c6b6561b"
|
||||
"checksum proc-macro-hack 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e688f31d92ffd7c1ddc57a1b4e6d773c0f2a14ee437a4b0a4f5a69c80eb221c8"
|
||||
"checksum proc-macro2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "afdc77cc74ec70ed262262942ebb7dac3d479e9e5cfa2da1841c0806f6cdabcc"
|
||||
|
|
|
@ -6,7 +6,7 @@ authors = ["rust-analyzer developers"]
|
|||
publish = false
|
||||
|
||||
[dependencies]
|
||||
pico-args = "0.2.0"
|
||||
pico-args = "0.3.0"
|
||||
flexi_logger = "0.14.0"
|
||||
indicatif = "0.11.0"
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ fn main() -> Result<()> {
|
|||
(true, true) => Err("Invalid flags: -q conflicts with -v")?,
|
||||
};
|
||||
let memory_usage = matches.contains("--memory-usage");
|
||||
let only: Option<String> = matches.value_from_str(["-o", "--only"])?;
|
||||
let only: Option<String> = matches.opt_value_from_str(["-o", "--only"])?;
|
||||
let path = {
|
||||
let mut trailing = matches.free()?;
|
||||
if trailing.len() != 1 {
|
||||
|
@ -117,9 +117,9 @@ fn main() -> Result<()> {
|
|||
return Ok(());
|
||||
}
|
||||
let verbose = matches.contains(["-v", "--verbose"]);
|
||||
let path: String = matches.value_from_str("--path")?.unwrap_or_default();
|
||||
let highlight_path = matches.value_from_str("--highlight")?;
|
||||
let complete_path = matches.value_from_str("--complete")?;
|
||||
let path: String = matches.opt_value_from_str("--path")?.unwrap_or_default();
|
||||
let highlight_path = matches.opt_value_from_str("--highlight")?;
|
||||
let complete_path = matches.opt_value_from_str("--complete")?;
|
||||
if highlight_path.is_some() && complete_path.is_some() {
|
||||
panic!("either --highlight or --complete must be set, not both")
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ publish = false
|
|||
[dependencies]
|
||||
walkdir = "2.1.3"
|
||||
itertools = "0.8.0"
|
||||
pico-args = "0.2.0"
|
||||
pico-args = "0.3.0"
|
||||
quote = "1.0.2"
|
||||
proc-macro2 = "1.0.1"
|
||||
ron = "0.5.1"
|
||||
|
|
Loading…
Reference in a new issue