Browse Source

Use `match` statement for daemon_dir construction

refactor-mempool
Roman Zeyde 6 years ago
parent
commit
774d75bd97
No known key found for this signature in database GPG Key ID: 87CAE5FA46917CBB
  1. 8
      src/config.rs

8
src/config.rs

@ -134,10 +134,10 @@ impl Config {
default_dir.push(".bitcoin"); default_dir.push(".bitcoin");
default_dir default_dir
}); });
if let Network::Testnet = network_type { match network_type {
daemon_dir.push("testnet3"); Network::Mainnet => (),
} else if let Network::Regtest = network_type { Network::Testnet => daemon_dir.push("testnet3"),
daemon_dir.push("regtest"); Network::Regtest => daemon_dir.push("regtest"),
} }
let cookie = m.value_of("cookie") let cookie = m.value_of("cookie")
.map(|s| s.to_owned()) .map(|s| s.to_owned())

Loading…
Cancel
Save