diff options
author | Matthias Beyer <matthias.beyer@ifm.com> | 2022-07-06 12:07:39 +0200 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@ifm.com> | 2022-07-06 12:08:42 +0200 |
commit | 1fbdec9f1e6dc1c0cbd899751af302b2328beb6f (patch) | |
tree | da94bbcc6096938cc9b5cd1c928caf06c4064613 | |
parent | 1535fd5a0e40524c8015446debf2948439af89c9 (diff) |
plugin_avg: Remove error infra for when mainloop stopping failed
Removes the error types and handling for the `MainloopStopper::stop()`
call, because that function does not return an error anymore.
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
-rw-r--r-- | plugins/plugin_avg/src/lib.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/plugins/plugin_avg/src/lib.rs b/plugins/plugin_avg/src/lib.rs index bc5f567c..5b0e6837 100644 --- a/plugins/plugin_avg/src/lib.rs +++ b/plugins/plugin_avg/src/lib.rs @@ -37,9 +37,6 @@ struct AvgConfig { enum Error { #[error("Failed to parse configuration")] ConfigParseFailed(#[from] toml::de::Error), - - #[error("Failed to stop main loop")] - FailedToStopMainloop, } #[async_trait] @@ -142,7 +139,7 @@ impl Plugin for AvgPlugin { #[tracing::instrument(name = "plugin.avg.shutdown")] async fn shutdown(&mut self) -> Result<(), PluginError> { if let Some(stopper) = self.stopper.take() { - stopper.stop().map_err(|()| Error::FailedToStopMainloop)?; + stopper.stop(); } Ok(()) } |