Skip to content

Commit 8fe3c00

Browse files
committed
refactor(cli): hoist the handle_epipe() call out of the match
1 parent ab070f0 commit 8fe3c00

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
@@ -530,14 +530,14 @@ impl RustupSubcmd {
530530
RustupSubcmd::DumpTestament => common::dump_testament(),
531531
RustupSubcmd::Install { opts } => update(cfg, opts),
532532
RustupSubcmd::Uninstall { opts } => toolchain_remove(cfg, opts),
533-
RustupSubcmd::Show { verbose, subcmd } => match subcmd {
534-
None => handle_epipe(show(cfg, verbose)),
533+
RustupSubcmd::Show { verbose, subcmd } => handle_epipe(match subcmd {
534+
None => show(cfg, verbose),
535535
Some(ShowSubcmd::ActiveToolchain { verbose }) => {
536-
handle_epipe(show_active_toolchain(cfg, verbose))
536+
show_active_toolchain(cfg, verbose)
537537
}
538-
Some(ShowSubcmd::Home) => handle_epipe(show_rustup_home(cfg)),
539-
Some(ShowSubcmd::Profile) => handle_epipe(show_profile(cfg)),
540-
},
538+
Some(ShowSubcmd::Home) => show_rustup_home(cfg),
539+
Some(ShowSubcmd::Profile) => show_profile(cfg),
540+
}),
541541
RustupSubcmd::Update {
542542
toolchain,
543543
no_self_update,

0 commit comments

Comments
 (0)