From 255cf0951571d235a391a657fd30c265ea8fafe2 Mon Sep 17 00:00:00 2001 From: Dominic Burkart Date: Tue, 20 Jun 2023 14:53:25 +0200 Subject: [PATCH] fix incorrect casts --- src/app.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app.rs b/src/app.rs index 6dca25555f3c75..f10275ac782b49 100644 --- a/src/app.rs +++ b/src/app.rs @@ -342,20 +342,21 @@ impl FinishedApplication { SignalTo::Shutdown => { emit!(VectorStopped); tokio::select! { - _ = topology_controller.stop() => ExitStatus::from_raw(exitcode::OK as u32), // Graceful shutdown finished + _ = topology_controller.stop() => ExitStatus::from_raw(exitcode::OK.try_into().unwrap()), // Graceful shutdown finished _ = signal_rx.recv() => { // It is highly unlikely that this event will exit from topology. emit!(VectorQuit); // Dropping the shutdown future will immediately shut the server down - ExitStatus::from_raw(exitcode::UNAVAILABLE as u32) + ExitStatus::from_raw(exitcode::UNAVAILABLE.try_into().unwrap()) } + } } SignalTo::Quit => { // It is highly unlikely that this event will exit from topology. emit!(VectorQuit); drop(topology_controller); - ExitStatus::from_raw(exitcode::UNAVAILABLE as u32) + ExitStatus::from_raw(exitcode::UNAVAILABLE.try_into().unwrap()) } _ => unreachable!(), }