From 6b98322754323e1d56051d9e9827a28be3c57fb6 Mon Sep 17 00:00:00 2001 From: bunnie Date: Thu, 12 Oct 2023 02:45:43 +0800 Subject: [PATCH] fix invalid unwrap() unwrap on a routine always returns None, so the unwrap() has no meaning (probably originally introduced just as a way to get match arms to have the same return result without thinking too much about it). --- services/net/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/net/src/main.rs b/services/net/src/main.rs index 83f710c7d..e46a210d8 100644 --- a/services/net/src/main.rs +++ b/services/net/src/main.rs @@ -926,7 +926,7 @@ fn main() -> ! { .unwrap_or_default(), ) } - None => respond_with_error(msg, NetError::Invalid).unwrap(), + None => respond_with_error(msg, NetError::Invalid).unwrap_or(()), // this always returns None, can't do anything other than this. } } else { respond_with_error(msg, NetError::Invalid);