From b4e69397600be57795930fbd37c0948ba9688098 Mon Sep 17 00:00:00 2001 From: kjeremy <kjeremy@gmail.com> Date: Wed, 2 Oct 2019 10:58:15 -0400 Subject: Update pico-args --- Cargo.lock | 8 ++++---- crates/ra_cli/Cargo.toml | 2 +- crates/ra_cli/src/main.rs | 8 ++++---- crates/ra_tools/Cargo.toml | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ada5e7bc2..988f7ec0b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -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" 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<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") } 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