Skip to content

Commit 4180bcd

Browse files
committed
Fix unused warning
1 parent 6552032 commit 4180bcd

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/main.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ use crate::hotplug::PluggableDevice;
2323
enum Event {
2424
Add(PluggedDevice),
2525
Remove(PluggedDevice),
26-
Initialized(Container),
27-
Stopped(Container, i64),
26+
Initialized,
27+
Stopped(i64),
2828
}
2929

3030
impl From<HotPlugEvent> for Event {
@@ -45,10 +45,10 @@ impl Display for Event {
4545
Event::Remove(dev) => {
4646
write!(f, "Detaching device {dev}")
4747
}
48-
Event::Initialized(_) => {
48+
Event::Initialized => {
4949
write!(f, "Container initialized")
5050
}
51-
Event::Stopped(_, status) => {
51+
Event::Stopped(status) => {
5252
write!(f, "Container exited with status {status}")
5353
}
5454
}
@@ -80,7 +80,7 @@ fn run_hotplug(
8080
}
8181
}
8282

83-
yield Event::Initialized(container.clone());
83+
yield Event::Initialized;
8484

8585
if !verbosity.is_silent() {
8686
container.attach().await?.pipe_std();
@@ -114,7 +114,7 @@ async fn run(param: cli::Run, verbosity: Verbosity<InfoLevel>) -> Result<u8> {
114114
let container = container.clone();
115115
async_stream::try_stream! {
116116
let status = container.wait().await?;
117-
yield Event::Stopped(container.clone(), status)
117+
yield Event::Stopped(status)
118118
}
119119
};
120120

@@ -134,7 +134,7 @@ async fn run(param: cli::Run, verbosity: Verbosity<InfoLevel>) -> Result<u8> {
134134
container.kill(15).await?;
135135
break;
136136
}
137-
Event::Stopped(_, code) => {
137+
Event::Stopped(code) => {
138138
status = 1;
139139
if let Ok(code) = u8::try_from(code) {
140140
// Use the container exit code, but only if it won't be confused

0 commit comments

Comments
 (0)