Skip to content

Commit 583ff53

Browse files
committed
notifications: log directly when hash file not found
1 parent 00c9f6c commit 583ff53

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/dist/download.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ impl<'a> DownloadCfg<'a> {
164164
warn!(file = %hash_file.display(), "can't read update hash file, can't skip update");
165165
}
166166
} else {
167-
(self.notify_handler)(Notification::NoUpdateHash(hash_file));
167+
debug!(file = %hash_file.display(), "no update hash file found");
168168
}
169169
}
170170

src/notifications.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ use crate::{dist::ToolchainDesc, toolchain::ToolchainName, utils::notify::Notifi
1111

1212
#[derive(Debug)]
1313
pub(crate) enum Notification<'a> {
14-
NoUpdateHash(&'a Path),
1514
FileAlreadyDownloaded,
1615
CachedFileChecksumFailed,
1716
MissingInstalledComponent(&'a str),
@@ -72,9 +71,7 @@ impl Notification<'_> {
7271
pub(crate) fn level(&self) -> NotificationLevel {
7372
use self::Notification::*;
7473
match self {
75-
NoUpdateHash(_) | FileAlreadyDownloaded | DownloadingLegacyManifest => {
76-
NotificationLevel::Debug
77-
}
74+
FileAlreadyDownloaded | DownloadingLegacyManifest => NotificationLevel::Debug,
7875
DownloadingComponent(_, _, _, _)
7976
| InstallingComponent(_, _, _)
8077
| RemovingComponent(_, _, _)
@@ -121,7 +118,6 @@ impl Display for Notification<'_> {
121118
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> std::result::Result<(), fmt::Error> {
122119
use self::Notification::*;
123120
match self {
124-
NoUpdateHash(path) => write!(f, "no update hash at: '{}'", path.display()),
125121
FileAlreadyDownloaded => write!(f, "reusing previously downloaded file"),
126122
CachedFileChecksumFailed => write!(f, "bad checksum for cached download"),
127123
MissingInstalledComponent(c) => {

0 commit comments

Comments
 (0)