Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
magick93 committed Dec 9, 2024
1 parent 7b32477 commit e335191
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 5 additions & 2 deletions anchor/src/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion anchor/src/environment_windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
}
}

Expand Down

0 comments on commit e335191

Please sign in to comment.