Skip to content

Commit f8e9756

Browse files
committed
refactor(cli): hoist the handle_epipe() call out of the match
1 parent f1dd638 commit f8e9756

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/cli/rustup_mode.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -529,14 +529,14 @@ impl RustupSubcmd {
529529
RustupSubcmd::DumpTestament => common::dump_testament(),
530530
RustupSubcmd::Install { opts } => update(cfg, opts),
531531
RustupSubcmd::Uninstall { opts } => toolchain_remove(cfg, opts),
532-
RustupSubcmd::Show { verbose, subcmd } => match subcmd {
533-
None => handle_epipe(show(cfg, verbose)),
532+
RustupSubcmd::Show { verbose, subcmd } => handle_epipe(match subcmd {
533+
None => show(cfg, verbose),
534534
Some(ShowSubcmd::ActiveToolchain { verbose }) => {
535-
handle_epipe(show_active_toolchain(cfg, verbose))
535+
show_active_toolchain(cfg, verbose)
536536
}
537-
Some(ShowSubcmd::Home) => handle_epipe(show_rustup_home(cfg)),
538-
Some(ShowSubcmd::Profile) => handle_epipe(show_profile(cfg)),
539-
},
537+
Some(ShowSubcmd::Home) => show_rustup_home(cfg),
538+
Some(ShowSubcmd::Profile) => show_profile(cfg),
539+
}),
540540
RustupSubcmd::Update {
541541
toolchain,
542542
no_self_update,

0 commit comments

Comments
 (0)