Skip to content

Commit 120153d

Browse files
authored
Merge pull request #1614 from kinnison/kinnison/fix-formatting
rustup-cli: Fix some formatting which got missed
2 parents f767b8f + 5e8c552 commit 120153d

File tree

1 file changed

+20
-15
lines changed

1 file changed

+20
-15
lines changed

src/rustup-cli/rustup_mode.rs

+20-15
Original file line numberDiff line numberDiff line change
@@ -400,22 +400,25 @@ pub fn cli() -> App<'static, 'static> {
400400
.help("Only print the path to the documentation"),
401401
)
402402
.args(
403-
&DOCS_DATA.into_iter().map(|(name, help_msg, _)| {
404-
Arg::with_name(name)
405-
.long(name)
406-
.help(help_msg)
407-
}).collect::<Vec<_>>()
403+
&DOCS_DATA
404+
.into_iter()
405+
.map(|(name, help_msg, _)| Arg::with_name(name).long(name).help(help_msg))
406+
.collect::<Vec<_>>(),
408407
)
409408
.arg(
410409
Arg::with_name("toolchain")
411410
.help(TOOLCHAIN_ARG_HELP)
412411
.long("toolchain")
413412
.takes_value(true),
414413
)
415-
.group(ArgGroup::with_name("page").args(
416-
&DOCS_DATA.into_iter().map(|(name, _, _)| *name)
417-
.collect::<Vec<_>>()
418-
)),
414+
.group(
415+
ArgGroup::with_name("page").args(
416+
&DOCS_DATA
417+
.into_iter()
418+
.map(|(name, _, _)| *name)
419+
.collect::<Vec<_>>(),
420+
),
421+
),
419422
);
420423

421424
if cfg!(not(target_os = "windows")) {
@@ -987,12 +990,14 @@ const DOCS_DATA: &[(&'static str, &'static str, &'static str,)] = &[
987990
fn doc(cfg: &Cfg, m: &ArgMatches) -> Result<()> {
988991
let toolchain = explicit_or_dir_toolchain(cfg, m)?;
989992

990-
let doc_url =
991-
if let Some((_, _, path)) = DOCS_DATA.into_iter().find(|(name, _, _)| m.is_present(name)) {
992-
path
993-
} else {
994-
"index.html"
995-
};
993+
let doc_url = if let Some((_, _, path)) = DOCS_DATA
994+
.into_iter()
995+
.find(|(name, _, _)| m.is_present(name))
996+
{
997+
path
998+
} else {
999+
"index.html"
1000+
};
9961001

9971002
if m.is_present("path") {
9981003
let doc_path = toolchain.doc_path(doc_url)?;

0 commit comments

Comments
 (0)