Remove unnecessary ? operator
clippy emits: warning: question mark operator is useless here As suggested, remove the `?` operator.
This commit is contained in:
parent
67ed8f673e
commit
a2a54b3982
|
@ -1310,7 +1310,7 @@ pub mod serde {
|
||||||
}
|
}
|
||||||
fn des_btc<'d, D: Deserializer<'d>>(d: D) -> Result<Self, D::Error> {
|
fn des_btc<'d, D: Deserializer<'d>>(d: D) -> Result<Self, D::Error> {
|
||||||
use serde::de::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> {
|
fn des_btc<'d, D: Deserializer<'d>>(d: D) -> Result<Self, D::Error> {
|
||||||
use serde::de::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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -269,7 +269,7 @@ mod display_from_str {
|
||||||
|
|
||||||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||||
let data = ::base64::decode(s).map_err(PsbtParseError::Base64Encoding)?;
|
let data = ::base64::decode(s).map_err(PsbtParseError::Base64Encoding)?;
|
||||||
Ok(encode::deserialize(&data).map_err(PsbtParseError::PsbtEncoding)?)
|
encode::deserialize(&data).map_err(PsbtParseError::PsbtEncoding)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue