11use std:: fmt:: { self , Display } ;
2- use std:: path:: { Path , PathBuf } ;
32
43use crate :: dist:: TargetTriple ;
54use crate :: utils:: notify:: NotificationLevel ;
@@ -25,11 +24,6 @@ pub(crate) enum Notification<'a> {
2524 /// member, but the notification callback is already narrowed to
2625 /// utils::notifications by the time tar unpacking is called.
2726 SetDefaultBufferSize ( usize ) ,
28- /// Both `rust-toolchain` and `rust-toolchain.toml` exist within a directory
29- DuplicateToolchainFile {
30- rust_toolchain : & ' a Path ,
31- rust_toolchain_toml : & ' a Path ,
32- } ,
3327}
3428
3529impl Notification < ' _ > {
@@ -44,7 +38,6 @@ impl Notification<'_> {
4438 | DownloadDataReceived ( _, _)
4539 | DownloadFinished ( _)
4640 | DownloadFailed ( _) => NotificationLevel :: Debug ,
47- DuplicateToolchainFile { .. } => NotificationLevel :: Warn ,
4841 }
4942 }
5043}
@@ -72,21 +65,6 @@ impl Display for Notification<'_> {
7265 DownloadDataReceived ( data, _) => write ! ( f, "received some data of size {}" , data. len( ) ) ,
7366 DownloadFinished ( _) => write ! ( f, "download finished" ) ,
7467 DownloadFailed ( _) => write ! ( f, "download failed" ) ,
75- DuplicateToolchainFile {
76- rust_toolchain,
77- rust_toolchain_toml,
78- } => write ! (
79- f,
80- "both `{0}` and `{1}` exist. Using `{0}`" ,
81- rust_toolchain
82- . canonicalize( )
83- . unwrap_or_else( |_| PathBuf :: from( rust_toolchain) )
84- . display( ) ,
85- rust_toolchain_toml
86- . canonicalize( )
87- . unwrap_or_else( |_| PathBuf :: from( rust_toolchain_toml) )
88- . display( ) ,
89- ) ,
9068 }
9169 }
9270}
0 commit comments