Skip to content

Commit 6cccc30

Browse files
committed
cli: drop unnecessary generics
1 parent 8d0bcc0 commit 6cccc30

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/cli/rustup_mode.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,7 @@ async fn show(cfg: &Cfg<'_>, verbose: bool) -> Result<utils::ExitCode> {
11211121
{
11221122
let mut t = cfg.process.stdout();
11231123

1124-
print_header::<Error>(&mut t, "installed toolchains")?;
1124+
print_header(&mut t, "installed toolchains")?;
11251125

11261126
let default_toolchain_name = cfg.get_default()?;
11271127
let last_index = installed_toolchains.len().wrapping_sub(1);
@@ -1159,7 +1159,7 @@ async fn show(cfg: &Cfg<'_>, verbose: bool) -> Result<utils::ExitCode> {
11591159

11601160
writeln!(t.lock())?;
11611161

1162-
print_header::<Error>(&mut t, "active toolchain")?;
1162+
print_header(&mut t, "active toolchain")?;
11631163

11641164
match active_toolchain_and_reason {
11651165
Some((active_toolchain_name, active_reason)) => {
@@ -1188,10 +1188,7 @@ async fn show(cfg: &Cfg<'_>, verbose: bool) -> Result<utils::ExitCode> {
11881188
}
11891189
}
11901190

1191-
fn print_header<E>(t: &mut ColorableTerminal, s: &str) -> Result<(), E>
1192-
where
1193-
E: From<io::Error>,
1194-
{
1191+
fn print_header(t: &mut ColorableTerminal, s: &str) -> Result<(), Error> {
11951192
t.attr(Attr::Bold)?;
11961193
{
11971194
let mut term_lock = t.lock();

0 commit comments

Comments
 (0)