From b4e69397600be57795930fbd37c0948ba9688098 Mon Sep 17 00:00:00 2001 From: kjeremy Date: Wed, 2 Oct 2019 10:58:15 -0400 Subject: Update pico-args --- crates/ra_cli/Cargo.toml | 2 +- crates/ra_cli/src/main.rs | 8 ++++---- crates/ra_tools/Cargo.toml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'crates') diff --git a/crates/ra_cli/Cargo.toml b/crates/ra_cli/Cargo.toml index d42ac3ad4..67e727a88 100644 --- a/crates/ra_cli/Cargo.toml +++ b/crates/ra_cli/Cargo.toml @@ -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" diff --git a/crates/ra_cli/src/main.rs b/crates/ra_cli/src/main.rs index e6c76087e..2405eb4f4 100644 --- a/crates/ra_cli/src/main.rs +++ b/crates/ra_cli/src/main.rs @@ -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 = matches.value_from_str(["-o", "--only"])?; + let only: Option = 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") } diff --git a/crates/ra_tools/Cargo.toml b/crates/ra_tools/Cargo.toml index 848ca408d..9cceacee3 100644 --- a/crates/ra_tools/Cargo.toml +++ b/crates/ra_tools/Cargo.toml @@ -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" -- cgit v1.2.3