Skip to content

Commit

Permalink
fix: map_or -> map_err (#2405)
Browse files Browse the repository at this point in the history
  • Loading branch information
larseggert authored Feb 4, 2025
1 parent ed0a053 commit 819551b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions neqo-transport/src/connection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2650,9 +2650,7 @@ impl Connection {
.get_bytes(tparams::STATELESS_RESET_TOKEN)
.map_or_else(
|| Ok(ConnectionIdEntry::random_srt()),
|token| {
<[u8; 16]>::try_from(token).map_or(Err(Error::TransportParameterError), Ok)
},
|token| <[u8; 16]>::try_from(token).map_err(|_| Error::TransportParameterError),
)?;
let path = self.paths.primary().ok_or(Error::NoAvailablePath)?;
path.borrow_mut().set_reset_token(reset_token);
Expand Down

0 comments on commit 819551b

Please sign in to comment.