Skip to content

Commit a418f35

Browse files
committed
refactor(dist/notifications)!: inline usages of Notification::ManifestChecksumFailedHack
1 parent 66f552c commit a418f35

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/dist/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use once_cell::sync::Lazy;
1010
use regex::Regex;
1111
use serde::{Deserialize, Serialize};
1212
use thiserror::Error as ThisError;
13+
use tracing::info;
1314

1415
use crate::{
1516
config::Cfg, currentprocess::Process, errors::RustupError, toolchain::ToolchainName,
@@ -1169,7 +1170,7 @@ pub(crate) async fn dl_v2_manifest(
11691170
Err(any) => {
11701171
if let Some(RustupError::ChecksumFailed { .. }) = any.downcast_ref::<RustupError>() {
11711172
// Checksum failed - issue warning to try again later
1172-
(download.notify_handler)(Notification::ManifestChecksumFailedHack);
1173+
info!("update not yet available, sorry! try again later")
11731174
}
11741175
Err(any)
11751176
}

src/dist/notifications.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ pub enum Notification<'a> {
3232
DownloadingLegacyManifest,
3333
SkippingNightlyMissingComponent(&'a ToolchainDesc, &'a Manifest, &'a [Component]),
3434
ForcingUnavailableComponent(&'a str),
35-
ManifestChecksumFailedHack,
3635
ComponentUnavailable(&'a str, Option<&'a TargetTriple>),
3736
StrayHash(&'a Path),
3837
SignatureInvalid(&'a str),
@@ -67,7 +66,6 @@ impl<'a> Notification<'a> {
6766
| RemovingComponent(_, _, _)
6867
| RemovingOldComponent(_, _, _)
6968
| ComponentAlreadyInstalled(_)
70-
| ManifestChecksumFailedHack
7169
| RollingBack
7270
| DownloadingManifest(_)
7371
| SkippingNightlyMissingComponent(_, _, _)
@@ -150,9 +148,6 @@ impl<'a> Display for Notification<'a> {
150148
write!(f, "latest update on {date}, no rust version")
151149
}
152150
DownloadingLegacyManifest => write!(f, "manifest not found. trying legacy manifest"),
153-
ManifestChecksumFailedHack => {
154-
write!(f, "update not yet available, sorry! try again later")
155-
}
156151
ComponentUnavailable(pkg, toolchain) => {
157152
if let Some(tc) = toolchain {
158153
write!(f, "component '{pkg}' is not available on target '{tc}'")

0 commit comments

Comments
 (0)