diff options
author | Aleksey Kladov <[email protected]> | 2019-02-08 11:49:43 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-02-08 11:49:43 +0000 |
commit | 12e3b4c70b5ef23b2fdfc197296d483680e125f9 (patch) | |
tree | 71baa0e0a62f9f6b61450501c5f821f67badf9e4 /crates/ra_cli | |
parent | 5cb1d41a30d25cbe136402644bf5434dd667f1e5 (diff) |
reformat the world
Diffstat (limited to 'crates/ra_cli')
-rw-r--r-- | crates/ra_cli/src/main.rs | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/crates/ra_cli/src/main.rs b/crates/ra_cli/src/main.rs index 6b5be27be..a4debeb48 100644 --- a/crates/ra_cli/src/main.rs +++ b/crates/ra_cli/src/main.rs | |||
@@ -13,18 +13,8 @@ fn main() -> Result<()> { | |||
13 | .setting(clap::AppSettings::SubcommandRequiredElseHelp) | 13 | .setting(clap::AppSettings::SubcommandRequiredElseHelp) |
14 | .subcommand( | 14 | .subcommand( |
15 | SubCommand::with_name("render-test") | 15 | SubCommand::with_name("render-test") |
16 | .arg( | 16 | .arg(Arg::with_name("line").long("--line").required(true).takes_value(true)) |
17 | Arg::with_name("line") | 17 | .arg(Arg::with_name("file").long("--file").required(true).takes_value(true)), |
18 | .long("--line") | ||
19 | .required(true) | ||
20 | .takes_value(true), | ||
21 | ) | ||
22 | .arg( | ||
23 | Arg::with_name("file") | ||
24 | .long("--file") | ||
25 | .required(true) | ||
26 | .takes_value(true), | ||
27 | ), | ||
28 | ) | 18 | ) |
29 | .subcommand(SubCommand::with_name("parse").arg(Arg::with_name("no-dump").long("--no-dump"))) | 19 | .subcommand(SubCommand::with_name("parse").arg(Arg::with_name("no-dump").long("--no-dump"))) |
30 | .subcommand(SubCommand::with_name("symbols")) | 20 | .subcommand(SubCommand::with_name("symbols")) |
@@ -108,8 +98,5 @@ fn selections(file: &SourceFile, start: u32, end: u32) -> String { | |||
108 | .iter() | 98 | .iter() |
109 | .map(|r| (1 + u32::from(r.start()), 1 + u32::from(r.end()))) | 99 | .map(|r| (1 + u32::from(r.start()), 1 + u32::from(r.end()))) |
110 | .map(|(s, e)| format!("({} {})", s, e)); | 100 | .map(|(s, e)| format!("({} {})", s, e)); |
111 | join(ranges) | 101 | join(ranges).separator(" ").surround_with("(", ")").to_string() |
112 | .separator(" ") | ||
113 | .surround_with("(", ")") | ||
114 | .to_string() | ||
115 | } | 102 | } |