Skip to content

Commit

Permalink
fix invalid unwrap()
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
bunnie committed Oct 11, 2023
1 parent d457f8b commit 6b98322
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/net/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6b98322

Please sign in to comment.