Remove unnecessary ? operator

clippy emits:

  warning: question mark operator is useless here

As suggested, remove the `?` operator.
This commit is contained in:
Tobin C. Harding 2022-06-23 13:58:29 +10:00
parent 67ed8f673e
commit a2a54b3982
2 changed files with 3 additions and 3 deletions

View File

@ -1310,7 +1310,7 @@ pub mod serde {
}
fn des_btc<'d, D: Deserializer<'d>>(d: D) -> Result<Self, D::Error> {
use serde::de::Error;
Ok(Amount::from_btc(f64::deserialize(d)?).map_err(D::Error::custom)?)
Amount::from_btc(f64::deserialize(d)?).map_err(D::Error::custom)
}
}
@ -1338,7 +1338,7 @@ pub mod serde {
}
fn des_btc<'d, D: Deserializer<'d>>(d: D) -> Result<Self, D::Error> {
use serde::de::Error;
Ok(SignedAmount::from_btc(f64::deserialize(d)?).map_err(D::Error::custom)?)
SignedAmount::from_btc(f64::deserialize(d)?).map_err(D::Error::custom)
}
}

View File

@ -269,7 +269,7 @@ mod display_from_str {
fn from_str(s: &str) -> Result<Self, Self::Err> {
let data = ::base64::decode(s).map_err(PsbtParseError::Base64Encoding)?;
Ok(encode::deserialize(&data).map_err(PsbtParseError::PsbtEncoding)?)
encode::deserialize(&data).map_err(PsbtParseError::PsbtEncoding)
}
}
}