Use map instead of and_then
As suggested by Clippy us `map` instead of `and_then` with an inner option.
This commit is contained in:
parent
e35601bb19
commit
bfe29c4ef6
@ -97,7 +97,7 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user