diff --git a/src/config.rs b/src/config.rs index c1dd984..11a6118 100644 --- a/src/config.rs +++ b/src/config.rs @@ -196,7 +196,7 @@ impl Config { Network::Testnet => daemon_dir.push("testnet3"), Network::Regtest => daemon_dir.push("regtest"), } - let cookie = m.value_of("cookie").map(|s| s.to_owned()); + let cookie = m.value_of("cookie").map(std::borrow::ToOwned::to_owned); let mut log = stderrlog::new(); log.verbosity(m.occurrences_of("verbosity") as usize); diff --git a/src/daemon.rs b/src/daemon.rs index ecbb1c7..c14e982 100644 --- a/src/daemon.rs +++ b/src/daemon.rs @@ -367,7 +367,7 @@ impl Daemon { info!("listing block files at {:?}", path); let mut paths: Vec = glob::glob(path.to_str().unwrap()) .chain_err(|| "failed to list blk*.dat files")? - .map(|res| res.unwrap()) + .map(std::result::Result::unwrap) .collect(); paths.sort(); Ok(paths) diff --git a/src/index.rs b/src/index.rs index 153b869..e7f2f50 100644 --- a/src/index.rs +++ b/src/index.rs @@ -254,7 +254,7 @@ fn read_indexed_headers(store: &ReadStore) -> HeaderList { assert_eq!( headers .last() - .map(|h| h.bitcoin_hash()) + .map(BitcoinHash::bitcoin_hash) .unwrap_or(null_hash), latest_blockhash );