diff options
author | Matthias Beyer <matthias.beyer@ifm.com> | 2022-04-14 17:05:53 +0200 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@ifm.com> | 2022-04-14 17:07:36 +0200 |
commit | 6523d2ea056c51149da9bb2f5bc152cac7eb194f (patch) | |
tree | db22c6a412add6eae300941665aaa06e305e9f01 | |
parent | f1330c291c115bc12e7305c7f095163ed48499d5 (diff) |
Adapt for changes from tedge_core API changes for miette handled errors
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
-rw-r--r-- | tedge/src/main.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tedge/src/main.rs b/tedge/src/main.rs index 0dd331fc..08424769 100644 --- a/tedge/src/main.rs +++ b/tedge/src/main.rs @@ -49,7 +49,7 @@ async fn main() -> miette::Result<()> { if !plugin_kinds.insert(kind_name) { miette::bail!("Plugin kind '{}' was already registered, cannot register!", kind_name) } - $app.with_plugin_builder($pbinstance).into_diagnostic()? + $app.with_plugin_builder($pbinstance)? } else { tracing::trace!("Not supporting plugins of type {}", std::stringify!($pluginbuilder)); $app @@ -95,7 +95,7 @@ async fn main() -> miette::Result<()> { plugin_measurement_filter::MeasurementFilterPluginBuilder ); - let (cancel_sender, application) = application.with_config(config).into_diagnostic()?; + let (cancel_sender, application) = application.with_config(config)?; info!("Application built"); match args.command { @@ -127,7 +127,7 @@ async fn run( let res = tokio::select! { res = &mut run_fut => { - res.into_diagnostic() + res }, _int = tokio::signal::ctrl_c() => { @@ -135,7 +135,7 @@ async fn run( info!("Shutting down..."); cancel_sender.cancel_app(); tokio::select! { - res = &mut run_fut => res.into_diagnostic(), + res = &mut run_fut => res, _ = tokio::signal::ctrl_c() => kill_app(run_fut), } } else { |