Fix cargo clippy warnings

Disabled warnings for nursery/tmp_plan as it's going to be replaced
anyways
This commit is contained in:
Daniela Brozzoni committed 2023-03-03 17:44:03 +01:00
1 parent 1805bd35c0
commit c61b3604e1
26 files changed
+139 -153

No files matched your search

+4 -3
View File
@@ -34,6 +34,7 @@ pub trait EsploraExt {
/// parallel.
///
/// [`ChainPosition`]: bdk_chain::sparse_chain::ChainPosition
#[allow(clippy::result_large_err)] // FIXME
fn scan<K: Ord + Clone>(
&self,
local_chain: &BTreeMap<u32, BlockHash>,
@@ -47,6 +48,7 @@ pub trait EsploraExt {
/// Convenience method to call [`scan`] without requiring a keychain.
///
/// [`scan`]: EsploraExt::scan
#[allow(clippy::result_large_err)] // FIXME
fn scan_without_keychain(
&self,
local_chain: &BTreeMap<u32, BlockHash>,
@@ -127,13 +129,12 @@ impl EsploraExt for esplora_client::BlockingClient {
let mut spks = spks.into_iter();
let mut last_active_index = None;
let mut empty_scripts = 0;
type IndexWithTxs = (u32, Vec<esplora_client::Tx>);
loop {
let handles = (0..parallel_requests)
.filter_map(
|_| -> Option<
std::thread::JoinHandle<Result<(u32, Vec<esplora_client::Tx>), _>>,
> {
|_| -> Option<std::thread::JoinHandle<Result<IndexWithTxs, _>>> {
let (index, script) = spks.next()?;
let client = self.clone();
Some(std::thread::spawn(move || {