From eab4c75b217950cf4272e490167137b1edb3b738 Mon Sep 17 00:00:00 2001 From: Sunil Nimmagadda Date: Mon, 28 Nov 2022 14:14:39 +0530 Subject: expect instead of unwrap. --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 59f4286..7d31e24 100644 --- a/src/main.rs +++ b/src/main.rs @@ -33,7 +33,7 @@ async fn main() { } }); let sighup_handle = tokio::spawn(async move { - let mut stream = signal(SignalKind::hangup()).unwrap(); + let mut stream = signal(SignalKind::hangup()).expect("Should be a signal stream"); loop { stream.recv().await; sighup_handler().await; -- cgit v1.2.3