Fix option_filter_map lint
This change fixes a lint introduced with the Rust 1.53.0 release. This
lint warns about the use of `map(Option::unwrap)`, which can be replaced
with a call to `flatten()`.
See
for more details.
@@ -145,7 +145,7 @@ pub fn make_command_transaction(commands: &[Command], signer: &dyn Signer) -> Tr
_ => None,
})
.filter(Option::is_some)
- .map(Option::unwrap)
+ .flatten()
.collect(),
)
.with_outputs(
@@ -170,7 +170,7 @@ pub fn make_command_transaction(commands: &[Command], signer: &dyn Signer) -> Tr
_ => None,
})
.filter(Option::is_some)
- .map(Option::unwrap)
+ .flatten()
.collect(),
)
.with_payload_hash_method(HashMethod::Sha512)
