File tree 2 files changed +7
-1
lines changed
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -156,6 +156,7 @@ impl ApplicationConfig {
156
156
}
157
157
158
158
impl Application {
159
+ #[ must_use]
159
160
pub fn run ( ) -> ExitStatus {
160
161
let ( runtime, app) = Self :: prepare_start ( ) . unwrap_or_else ( |code| std:: process:: exit ( code) ) ;
161
162
@@ -254,10 +255,12 @@ pub struct StartedApplication {
254
255
}
255
256
256
257
impl StartedApplication {
258
+ #[ must_use]
257
259
pub async fn run ( self ) -> ExitStatus {
258
260
self . main ( ) . await . shutdown ( ) . await
259
261
}
260
262
263
+ #[ must_use]
261
264
pub async fn main ( self ) -> FinishedApplication {
262
265
let Self {
263
266
config_paths,
@@ -353,6 +356,7 @@ pub struct FinishedApplication {
353
356
}
354
357
355
358
impl FinishedApplication {
359
+ #[ must_use]
356
360
pub async fn shutdown ( self ) -> ExitStatus {
357
361
let FinishedApplication {
358
362
signal,
@@ -374,6 +378,7 @@ impl FinishedApplication {
374
378
}
375
379
}
376
380
381
+ #[ must_use]
377
382
async fn stop ( topology_controller : TopologyController , mut signal_rx : SignalRx ) -> ExitStatus {
378
383
emit ! ( VectorStopped ) ;
379
384
tokio:: select! {
@@ -389,6 +394,7 @@ impl FinishedApplication {
389
394
}
390
395
}
391
396
397
+ #[ must_use]
392
398
fn quit ( ) -> ExitStatus {
393
399
// It is highly unlikely that this event will exit from topology.
394
400
emit ! ( VectorQuit ) ;
Original file line number Diff line number Diff line change @@ -379,7 +379,7 @@ fn run_service(_arguments: Vec<OsString>) -> Result<()> {
379
379
380
380
// Handle stop
381
381
ServiceControl :: Stop => {
382
- while signal_tx. send ( SignalTo :: Shutdown ) . is_err ( ) { }
382
+ while signal_tx. send ( SignalTo :: Shutdown ( None ) ) . is_err ( ) { }
383
383
ServiceControlHandlerResult :: NoError
384
384
}
385
385
You can’t perform that action at this time.
0 commit comments