Use if instead of match for boolean

This commit is contained in:
Philipp Hoenisch 2020-11-05 16:13:57 +11:00
parent e4046e6791
commit 3a432e8233
No known key found for this signature in database
GPG Key ID: E5F8E74C672BC666

View File

@ -112,9 +112,10 @@ async fn main() -> Result<()> {
let tor_conf = tor_conf(None, tor_control_port, tor_proxy_port);
let transport = match tor {
true => build_tor(local_key_pair, None, tor_conf)?,
false => build(local_key_pair)?,
let transport = if tor {
build_tor(local_key_pair, None, tor_conf)?
} else {
build(local_key_pair)?
};
let bitcoin_wallet = bitcoin::Wallet::new("bob", bitcoind_url)