1
1
use crate :: dist:: manifest:: Component ;
2
- use crate :: dist:: temp;
3
2
use crate :: dist:: { TargetTriple , ToolchainDesc } ;
4
3
use crate :: utils:: notify:: NotificationLevel ;
5
4
use std:: fmt:: { self , Display } ;
@@ -10,8 +9,6 @@ use super::manifest::Manifest;
10
9
#[ derive( Debug ) ]
11
10
pub enum Notification < ' a > {
12
11
Utils ( crate :: utils:: Notification < ' a > ) ,
13
- Temp ( temp:: Notification < ' a > ) ,
14
-
15
12
Extracting ( & ' a Path , & ' a Path ) ,
16
13
ComponentAlreadyInstalled ( & ' a str ) ,
17
14
CantReadUpdateHash ( & ' a Path ) ,
@@ -45,17 +42,10 @@ impl<'a> From<crate::utils::Notification<'a>> for Notification<'a> {
45
42
}
46
43
}
47
44
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
-
54
45
impl Notification < ' _ > {
55
46
pub ( crate ) fn level ( & self ) -> NotificationLevel {
56
47
use self :: Notification :: * ;
57
48
match self {
58
- Temp ( n) => n. level ( ) ,
59
49
Utils ( n) => n. level ( ) ,
60
50
ChecksumValid ( _)
61
51
| NoUpdateHash ( _)
@@ -89,7 +79,6 @@ impl Display for Notification<'_> {
89
79
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> std:: result:: Result < ( ) , fmt:: Error > {
90
80
use self :: Notification :: * ;
91
81
match self {
92
- Temp ( n) => n. fmt ( f) ,
93
82
Utils ( n) => n. fmt ( f) ,
94
83
Extracting ( _, _) => write ! ( f, "extracting..." ) ,
95
84
ComponentAlreadyInstalled ( c) => write ! ( f, "component {c} is up to date" ) ,
0 commit comments