Skip to content

Commit 5424877

Browse files
committed
notifications: log directly when setting auto-self-update mode
1 parent c132bb1 commit 5424877

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ impl<'a> Cfg<'a> {
368368
s.auto_self_update = Some(mode);
369369
Ok(())
370370
})?;
371-
(self.notify_handler)(Notification::SetSelfUpdate(mode.as_str()));
371+
info!("auto-self-update mode set to {}", mode.as_str());
372372
Ok(())
373373
}
374374

src/notifications.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ pub(crate) enum Notification<'a> {
2626
/// member, but the notification callback is already narrowed to
2727
/// utils::notifications by the time tar unpacking is called.
2828
SetDefaultBufferSize(usize),
29-
SetSelfUpdate(&'a str),
3029
LookingForToolchain(&'a ToolchainDesc),
3130
ToolchainDirectory(&'a Path),
3231
UpdatingToolchain(&'a str),
@@ -66,8 +65,7 @@ impl Notification<'_> {
6665
| ReadMetadataVersion(_)
6766
| InstalledToolchain(_)
6867
| UpdateHashMatches => NotificationLevel::Debug,
69-
SetSelfUpdate(_)
70-
| UsingExistingToolchain(_)
68+
UsingExistingToolchain(_)
7169
| UninstallingToolchain(_)
7270
| UninstalledToolchain(_)
7371
| UpgradingMetadata(_, _)
@@ -100,7 +98,6 @@ impl Display for Notification<'_> {
10098
DownloadDataReceived(data, _) => write!(f, "received some data of size {}", data.len()),
10199
DownloadFinished(_) => write!(f, "download finished"),
102100
DownloadFailed(_) => write!(f, "download failed"),
103-
SetSelfUpdate(mode) => write!(f, "auto-self-update mode set to '{mode}'"),
104101
LookingForToolchain(name) => write!(f, "looking for installed toolchain '{name}'"),
105102
ToolchainDirectory(path) => write!(f, "toolchain directory: '{}'", path.display()),
106103
UpdatingToolchain(name) => write!(f, "updating existing install for '{name}'"),

0 commit comments

Comments
 (0)