mirror of
https://github.com/romanz/electrs.git
synced 2025-02-23 14:50:45 +01:00
Fix a few clippy lints
This commit is contained in:
parent
2597eee006
commit
5fd624c074
3 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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…
Add table
Reference in a new issue