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).
This commit is contained in:
bunnie 2023-10-12 02:45:43 +08:00
parent d457f8b555
commit 6b98322754

View file

@ -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);