Skip to content

Commit 591ed27

Browse files
djcChrisDenton
authored andcommitted
cli: avoid dropped temporary
1 parent e3e6d02 commit 591ed27

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cli/rustup_mode.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,8 +1221,8 @@ async fn show_active_toolchain(cfg: &Cfg<'_>, verbose: bool) -> Result<ExitCode>
12211221
"{} ({})",
12221222
toolchain.name(),
12231223
match source {
1224-
ActiveSource::Default => &"default" as &dyn fmt::Display,
1225-
_ => &source.to_reason(),
1224+
ActiveSource::Default => Cow::Borrowed("default"),
1225+
_ => Cow::Owned(source.to_reason()),
12261226
}
12271227
)?;
12281228
}

0 commit comments

Comments
 (0)