@@ -23,8 +23,8 @@ use crate::hotplug::PluggableDevice;
23
23
enum Event {
24
24
Add ( PluggedDevice ) ,
25
25
Remove ( PluggedDevice ) ,
26
- Initialized ( Container ) ,
27
- Stopped ( Container , i64 ) ,
26
+ Initialized ,
27
+ Stopped ( i64 ) ,
28
28
}
29
29
30
30
impl From < HotPlugEvent > for Event {
@@ -45,10 +45,10 @@ impl Display for Event {
45
45
Event :: Remove ( dev) => {
46
46
write ! ( f, "Detaching device {dev}" )
47
47
}
48
- Event :: Initialized ( _ ) => {
48
+ Event :: Initialized => {
49
49
write ! ( f, "Container initialized" )
50
50
}
51
- Event :: Stopped ( _ , status) => {
51
+ Event :: Stopped ( status) => {
52
52
write ! ( f, "Container exited with status {status}" )
53
53
}
54
54
}
@@ -80,7 +80,7 @@ fn run_hotplug(
80
80
}
81
81
}
82
82
83
- yield Event :: Initialized ( container . clone ( ) ) ;
83
+ yield Event :: Initialized ;
84
84
85
85
if !verbosity. is_silent( ) {
86
86
container. attach( ) . await ?. pipe_std( ) ;
@@ -114,7 +114,7 @@ async fn run(param: cli::Run, verbosity: Verbosity<InfoLevel>) -> Result<u8> {
114
114
let container = container. clone ( ) ;
115
115
async_stream:: try_stream! {
116
116
let status = container. wait( ) . await ?;
117
- yield Event :: Stopped ( container . clone ( ) , status)
117
+ yield Event :: Stopped ( status)
118
118
}
119
119
} ;
120
120
@@ -134,7 +134,7 @@ async fn run(param: cli::Run, verbosity: Verbosity<InfoLevel>) -> Result<u8> {
134
134
container. kill ( 15 ) . await ?;
135
135
break ;
136
136
}
137
- Event :: Stopped ( _ , code) => {
137
+ Event :: Stopped ( code) => {
138
138
status = 1 ;
139
139
if let Ok ( code) = u8:: try_from ( code) {
140
140
// Use the container exit code, but only if it won't be confused
0 commit comments