From e3351916bed97cddc91d44b96407bae7faf13a83 Mon Sep 17 00:00:00 2001 From: Anton Hughes Date: Mon, 9 Dec 2024 16:14:37 +1300 Subject: [PATCH] fmt --- anchor/src/environment.rs | 7 +++++-- anchor/src/environment_windows.rs | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/anchor/src/environment.rs b/anchor/src/environment.rs index bf33b3ec..32eedccf 100644 --- a/anchor/src/environment.rs +++ b/anchor/src/environment.rs @@ -151,8 +151,11 @@ impl Environment { .signal_rx .take() .ok_or("Inner shutdown already received")?; - - match self.runtime().block_on(environment_windows::handle_shutdown_signals(signal_rx)) { + + match self + .runtime() + .block_on(environment_windows::handle_shutdown_signals(signal_rx)) + { Ok(reason) => { info!(reason = reason.message(), "Internal shutdown received"); Ok(reason) diff --git a/anchor/src/environment_windows.rs b/anchor/src/environment_windows.rs index 96c0b4e9..25ddfbe2 100644 --- a/anchor/src/environment_windows.rs +++ b/anchor/src/environment_windows.rs @@ -34,7 +34,9 @@ pub(crate) async fn handle_shutdown_signals( match register_handlers.await { future::Either::Left((Ok(reason), _)) => Ok(reason), future::Either::Left((Err(e), _)) => Err(e.into()), - future::Either::Right(((res, _, _), _)) => res.ok_or_else(|| "Handler channel closed".to_string()), + future::Either::Right(((res, _, _), _)) => { + res.ok_or_else(|| "Handler channel closed".to_string()) + } } }