Skip to content

Commit 97cfe44

Browse files
committed
notifications: log the toolchain directory directly
1 parent e0fe417 commit 97cfe44

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/install.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
use std::path::{Path, PathBuf};
44

55
use anyhow::Result;
6+
use tracing::debug;
67

78
use crate::{
89
config::Cfg,
@@ -55,7 +56,7 @@ impl InstallMethod<'_> {
5556
_ => nh(Notification::UpdatingToolchain(&self.dest_basename())),
5657
}
5758

58-
nh(Notification::ToolchainDirectory(&self.dest_path()));
59+
debug!("toolchain directory: {}", self.dest_path().display());
5960
let updated = self.run(&self.dest_path()).await?;
6061

6162
let status = match updated {

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-
ToolchainDirectory(&'a Path),
3029
UpdatingToolchain(&'a str),
3130
InstallingToolchain(&'a str),
3231
InstalledToolchain(&'a str),
@@ -56,8 +55,7 @@ impl Notification<'_> {
5655
| DownloadDataReceived(_, _)
5756
| DownloadFinished(_)
5857
| DownloadFailed(_) => NotificationLevel::Debug,
59-
ToolchainDirectory(_)
60-
| InstallingToolchain(_)
58+
InstallingToolchain(_)
6159
| UpdatingToolchain(_)
6260
| ReadMetadataVersion(_)
6361
| InstalledToolchain(_)
@@ -94,7 +92,6 @@ impl Display for Notification<'_> {
9492
DownloadDataReceived(data, _) => write!(f, "received some data of size {}", data.len()),
9593
DownloadFinished(_) => write!(f, "download finished"),
9694
DownloadFailed(_) => write!(f, "download failed"),
97-
ToolchainDirectory(path) => write!(f, "toolchain directory: '{}'", path.display()),
9895
UpdatingToolchain(name) => write!(f, "updating existing install for '{name}'"),
9996
InstallingToolchain(name) => write!(f, "installing toolchain '{name}'"),
10097
InstalledToolchain(name) => write!(f, "toolchain '{name}' installed"),

0 commit comments

Comments
 (0)