Skip to content

Commit ad080cf

Browse files
committed
Remove unnecessary ? operator
clippy emits: warning: question mark operator is useless here As suggested, remove the `?` operator.
1 parent dd7e074 commit ad080cf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/util/amount.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,7 +1310,7 @@ pub mod serde {
13101310
}
13111311
fn des_btc<'d, D: Deserializer<'d>>(d: D) -> Result<Self, D::Error> {
13121312
use serde::de::Error;
1313-
Ok(Amount::from_btc(f64::deserialize(d)?).map_err(D::Error::custom)?)
1313+
Amount::from_btc(f64::deserialize(d)?).map_err(D::Error::custom)
13141314
}
13151315
}
13161316

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

src/util/psbt/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ mod display_from_str {
269269

270270
fn from_str(s: &str) -> Result<Self, Self::Err> {
271271
let data = ::base64::decode(s).map_err(PsbtParseError::Base64Encoding)?;
272-
Ok(encode::deserialize(&data).map_err(PsbtParseError::PsbtEncoding)?)
272+
encode::deserialize(&data).map_err(PsbtParseError::PsbtEncoding)
273273
}
274274
}
275275
}

0 commit comments

Comments
 (0)