Skip to content

Commit

Permalink
Prefer inspect_err over map_err
Browse files Browse the repository at this point in the history
This fixes a new clippy lint.
  • Loading branch information
robin-nitrokey committed Oct 18, 2024
1 parent 5179795 commit 1b9c486
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lib/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,9 +385,8 @@ where
pub fn get_input_deserialized_from_slice<'a, T: Deserialize<'a>>(
message: &'a Message,
) -> Result<T, cbor_smol::Error> {
cbor_deserialize::<T>(&message[3..]).map_err(|e| {
debug_now!("Input deserialization error: {:?}", e);
e
cbor_deserialize::<T>(&message[3..]).inspect_err(|_e| {
debug_now!("Input deserialization error: {:?}", _e);
})
}
}
Expand Down

0 comments on commit 1b9c486

Please sign in to comment.