aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_cli/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_cli/src')
-rw-r--r--crates/ra_cli/src/main.rs8
1 files changed, 4 insertions, 4 deletions
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 }