From bfe29c4ef60b52a71123274f445205ee01b2504b Mon Sep 17 00:00:00 2001 From: Tobin Harding Date: Wed, 10 Feb 2021 11:36:12 +1100 Subject: [PATCH] Use map instead of and_then As suggested by Clippy us `map` instead of `and_then` with an inner option. --- examples/compiler.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/compiler.rs b/examples/compiler.rs index 3b62147c..284aa12e 100644 --- a/examples/compiler.rs +++ b/examples/compiler.rs @@ -97,7 +97,7 @@ fn main() -> Result<(), Box> { let network = matches .value_of("network") - .and_then(|n| Some(Network::from_str(n))) + .map(|n| Network::from_str(n)) .transpose() .unwrap() .unwrap_or(Network::Testnet);