Skip to content

Commit 9dc4e8e

Browse files
committed
notifications: log directly when downloading legacy manifests
1 parent 2224be5 commit 9dc4e8e

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/dist/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use itertools::Itertools;
1111
use regex::Regex;
1212
use serde::{Deserialize, Serialize};
1313
use thiserror::Error as ThisError;
14-
use tracing::{info, warn};
14+
use tracing::{debug, info, warn};
1515

1616
use crate::{
1717
config::{Cfg, dist_root_server},
@@ -1173,7 +1173,7 @@ async fn try_update_from_dist_(
11731173
Some(RustupError::ChecksumFailed { .. }) => return Ok(None),
11741174
Some(RustupError::DownloadNotExists { .. }) => {
11751175
// Proceed to try v1 as a fallback
1176-
(download.notify_handler)(Notification::DownloadingLegacyManifest)
1176+
debug!("manifest not found; trying legacy manifest");
11771177
}
11781178
_ => return Err(err),
11791179
}

src/notifications.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ pub(crate) enum Notification<'a> {
1515
CachedFileChecksumFailed,
1616
/// The URL of the download is passed as the last argument, to allow us to track concurrent downloads.
1717
DownloadingComponent(&'a str, &'a TargetTriple, Option<&'a TargetTriple>, &'a str),
18-
DownloadingLegacyManifest,
1918
SkippingNightlyMissingComponent(&'a ToolchainDesc, &'a Manifest, &'a [Component]),
2019
ForcingUnavailableComponent(&'a str),
2120
StrayHash(&'a Path),
@@ -64,7 +63,7 @@ impl Notification<'_> {
6463
pub(crate) fn level(&self) -> NotificationLevel {
6564
use self::Notification::*;
6665
match self {
67-
FileAlreadyDownloaded | DownloadingLegacyManifest => NotificationLevel::Debug,
66+
FileAlreadyDownloaded => NotificationLevel::Debug,
6867
DownloadingComponent(_, _, _, _)
6968
| SkippingNightlyMissingComponent(_, _, _)
7069
| RetryingDownload(_) => NotificationLevel::Info,
@@ -113,7 +112,6 @@ impl Display for Notification<'_> {
113112
write!(f, "downloading component '{}' for '{}'", c, t.unwrap())
114113
}
115114
}
116-
DownloadingLegacyManifest => write!(f, "manifest not found. trying legacy manifest"),
117115
StrayHash(path) => write!(
118116
f,
119117
"removing stray hash found at '{}' in order to continue",

0 commit comments

Comments
 (0)