Skip to content

Commit 61ea71b

Browse files
authored
style: use inspect_err for shutdown signal handler (#1877)
1 parent 2e873c1 commit 61ea71b

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

agent-control/src/bin/main_k8s.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,5 @@ pub fn create_shutdown_signal_handler(
6666
.publish(ApplicationEvent::StopRequested)
6767
.inspect_err(|e| error!("Could not send agent control stop request: {}", e));
6868
})
69-
.map_err(|e| {
70-
error!("Could not set signal handler: {}", e);
71-
e
72-
})?;
73-
74-
Ok(())
69+
.inspect_err(|e| error!("Could not set signal handler: {e}"))
7570
}

agent-control/src/bin/main_onhost.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,5 @@ pub fn create_shutdown_signal_handler(
7777
.publish(ApplicationEvent::StopRequested)
7878
.inspect_err(|e| error!("Could not send agent control stop request: {}", e));
7979
})
80-
.map_err(|e| {
81-
error!("Could not set signal handler: {}", e);
82-
e
83-
})?;
84-
85-
Ok(())
80+
.inspect_err(|e| error!("Could not set signal handler: {e}"))
8681
}

0 commit comments

Comments
 (0)