diff options
Diffstat (limited to 'crates/ra_cli')
-rw-r--r-- | crates/ra_cli/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/ra_cli/src/main.rs | 8 |
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"] | |||
6 | publish = false | 6 | publish = false |
7 | 7 | ||
8 | [dependencies] | 8 | [dependencies] |
9 | pico-args = "0.2.0" | 9 | pico-args = "0.3.0" |
10 | flexi_logger = "0.14.0" | 10 | flexi_logger = "0.14.0" |
11 | indicatif = "0.11.0" | 11 | indicatif = "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 | } |