aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_cli
diff options
context:
space:
mode:
authorkjeremy <[email protected]>2019-10-02 15:58:15 +0100
committerkjeremy <[email protected]>2019-10-02 15:58:15 +0100
commitb4e69397600be57795930fbd37c0948ba9688098 (patch)
treee408f9e277d31e4961e7ab41acc8ec1b703b5327 /crates/ra_cli
parent79979db944fd662b7d4b495850c08ef715cd6169 (diff)
Update pico-args
Diffstat (limited to 'crates/ra_cli')
-rw-r--r--crates/ra_cli/Cargo.toml2
-rw-r--r--crates/ra_cli/src/main.rs8
2 files changed, 5 insertions, 5 deletions
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"]
6publish = false 6publish = false
7 7
8[dependencies] 8[dependencies]
9pico-args = "0.2.0" 9pico-args = "0.3.0"
10flexi_logger = "0.14.0" 10flexi_logger = "0.14.0"
11indicatif = "0.11.0" 11indicatif = "0.11.0"
12 12
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<()> {
95 (true, true) => Err("Invalid flags: -q conflicts with -v")?, 95 (true, true) => Err("Invalid flags: -q conflicts with -v")?,
96 }; 96 };
97 let memory_usage = matches.contains("--memory-usage"); 97 let memory_usage = matches.contains("--memory-usage");
98 let only: Option<String> = matches.value_from_str(["-o", "--only"])?; 98 let only: Option<String> = matches.opt_value_from_str(["-o", "--only"])?;
99 let path = { 99 let path = {
100 let mut trailing = matches.free()?; 100 let mut trailing = matches.free()?;
101 if trailing.len() != 1 { 101 if trailing.len() != 1 {
@@ -117,9 +117,9 @@ fn main() -> Result<()> {
117 return Ok(()); 117 return Ok(());
118 } 118 }
119 let verbose = matches.contains(["-v", "--verbose"]); 119 let verbose = matches.contains(["-v", "--verbose"]);
120 let path: String = matches.value_from_str("--path")?.unwrap_or_default(); 120 let path: String = matches.opt_value_from_str("--path")?.unwrap_or_default();
121 let highlight_path = matches.value_from_str("--highlight")?; 121 let highlight_path = matches.opt_value_from_str("--highlight")?;
122 let complete_path = matches.value_from_str("--complete")?; 122 let complete_path = matches.opt_value_from_str("--complete")?;
123 if highlight_path.is_some() && complete_path.is_some() { 123 if highlight_path.is_some() && complete_path.is_some() {
124 panic!("either --highlight or --complete must be set, not both") 124 panic!("either --highlight or --complete must be set, not both")
125 } 125 }