clippy: remove some newly-detected unnecessary returns

This commit is contained in:
Andrew Poelstra 2024-09-30 12:30:11 +00:00
parent 053a633b27
commit c2674caf4c
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
2 changed files with 2 additions and 2 deletions

View File

@ -276,7 +276,7 @@ pub mod hex_bytes {
if let Ok(hex) = core::str::from_utf8(v) { if let Ok(hex) = core::str::from_utf8(v) {
FromHex::from_hex(hex).map_err(E::custom) FromHex::from_hex(hex).map_err(E::custom)
} else { } else {
return Err(E::invalid_value(serde::de::Unexpected::Bytes(v), &self)); Err(E::invalid_value(serde::de::Unexpected::Bytes(v), &self))
} }
} }

View File

@ -31,7 +31,7 @@ pub mod serde_details {
if let Ok(hex) = str::from_utf8(v) { if let Ok(hex) = str::from_utf8(v) {
hex.parse::<Self::Value>().map_err(E::custom) hex.parse::<Self::Value>().map_err(E::custom)
} else { } else {
return Err(E::invalid_value(de::Unexpected::Bytes(v), &self)); Err(E::invalid_value(de::Unexpected::Bytes(v), &self))
} }
} }