From 1863c397ecf747bd76f0db809421bfbb94e26f3b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 22 Dec 2023 00:21:40 +0000 Subject: [PATCH] Format Rust code using rustfmt --- src/intercept_sigs.rs | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/src/intercept_sigs.rs b/src/intercept_sigs.rs index 86dcc268..ea8a0d69 100644 --- a/src/intercept_sigs.rs +++ b/src/intercept_sigs.rs @@ -2,22 +2,18 @@ use tokio::signal::unix::{signal, SignalKind}; /// trigger cleanup if receive signal to kill process pub async fn intercept_sigs() -> String { - let mut sigalrm = signal(SignalKind::alarm()) - .expect("uqbar: failed to set up SIGALRM handler"); - let mut sighup = signal(SignalKind::hangup()) - .expect("uqbar: failed to set up SIGHUP handler"); - let mut sigint = signal(SignalKind::interrupt()) - .expect("uqbar: failed to set up SIGINT handler"); - let mut sigpipe = signal(SignalKind::pipe()) - .expect("uqbar: failed to set up SIGPIPE handler"); - let mut sigquit = signal(SignalKind::quit()) - .expect("uqbar: failed to set up SIGQUIT handler"); - let mut sigterm = signal(SignalKind::terminate()) - .expect("uqbar: failed to set up SIGTERM handler"); - let mut sigusr1 = signal(SignalKind::user_defined1()) - .expect("uqbar: failed to set up SIGUSR1 handler"); - let mut sigusr2 = signal(SignalKind::user_defined2()) - .expect("uqbar: failed to set up SIGUSR2 handler"); + let mut sigalrm = signal(SignalKind::alarm()).expect("uqbar: failed to set up SIGALRM handler"); + let mut sighup = signal(SignalKind::hangup()).expect("uqbar: failed to set up SIGHUP handler"); + let mut sigint = + signal(SignalKind::interrupt()).expect("uqbar: failed to set up SIGINT handler"); + let mut sigpipe = signal(SignalKind::pipe()).expect("uqbar: failed to set up SIGPIPE handler"); + let mut sigquit = signal(SignalKind::quit()).expect("uqbar: failed to set up SIGQUIT handler"); + let mut sigterm = + signal(SignalKind::terminate()).expect("uqbar: failed to set up SIGTERM handler"); + let mut sigusr1 = + signal(SignalKind::user_defined1()).expect("uqbar: failed to set up SIGUSR1 handler"); + let mut sigusr2 = + signal(SignalKind::user_defined2()).expect("uqbar: failed to set up SIGUSR2 handler"); tokio::select! { _ = sigalrm.recv() => "exiting due to SIGALRM",