11use crate :: dist:: manifest:: Component ;
2- use crate :: dist:: temp;
32use crate :: dist:: { TargetTriple , ToolchainDesc } ;
43use crate :: utils:: notify:: NotificationLevel ;
54use std:: fmt:: { self , Display } ;
@@ -10,8 +9,6 @@ use super::manifest::Manifest;
109#[ derive( Debug ) ]
1110pub enum Notification < ' a > {
1211 Utils ( crate :: utils:: Notification < ' a > ) ,
13- Temp ( temp:: Notification < ' a > ) ,
14-
1512 Extracting ( & ' a Path , & ' a Path ) ,
1613 ComponentAlreadyInstalled ( & ' a str ) ,
1714 CantReadUpdateHash ( & ' a Path ) ,
@@ -45,17 +42,10 @@ impl<'a> From<crate::utils::Notification<'a>> for Notification<'a> {
4542 }
4643}
4744
48- impl < ' a > From < temp:: Notification < ' a > > for Notification < ' a > {
49- fn from ( n : temp:: Notification < ' a > ) -> Self {
50- Notification :: Temp ( n)
51- }
52- }
53-
5445impl Notification < ' _ > {
5546 pub ( crate ) fn level ( & self ) -> NotificationLevel {
5647 use self :: Notification :: * ;
5748 match self {
58- Temp ( n) => n. level ( ) ,
5949 Utils ( n) => n. level ( ) ,
6050 ChecksumValid ( _)
6151 | NoUpdateHash ( _)
@@ -89,7 +79,6 @@ impl Display for Notification<'_> {
8979 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> std:: result:: Result < ( ) , fmt:: Error > {
9080 use self :: Notification :: * ;
9181 match self {
92- Temp ( n) => n. fmt ( f) ,
9382 Utils ( n) => n. fmt ( f) ,
9483 Extracting ( _, _) => write ! ( f, "extracting..." ) ,
9584 ComponentAlreadyInstalled ( c) => write ! ( f, "component {c} is up to date" ) ,
0 commit comments