Browse Source

Fix a few clippy lints

fees
Roman Zeyde 6 years ago
parent
commit
5fd624c074
No known key found for this signature in database GPG Key ID: 87CAE5FA46917CBB
  1. 2
      src/config.rs
  2. 2
      src/daemon.rs
  3. 2
      src/index.rs

2
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);

2
src/daemon.rs

@ -367,7 +367,7 @@ impl Daemon {
info!("listing block files at {:?}", path);
let mut paths: Vec<PathBuf> = 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)

2
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
);

Loading…
Cancel
Save