Allow mutex_atomic

Clippy complains about use of a mutex, suggesting we use an
 `AtomicUsize`. While the same functionality _could_ be achieved using an
 `AtomicUsize` and a CAS loop it makes the code harder to reason about
 for little gain. Lets just quieten clippy with an allow attribute and
 document why we did so.
This commit is contained in:
Tobin Harding 2020-12-23 15:58:57 +11:00
parent 35184e6908
commit ba8ce7233d
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607

View File

@ -239,6 +239,7 @@ impl Blockchain for CompactFiltersBlockchain {
vec![Capability::FullHistory].into_iter().collect()
}
#[allow(clippy::mutex_atomic)] // Mutex is easier to understand than a CAS loop.
fn setup<D: BatchDatabase, P: 'static + Progress>(
&self,
_stop_gap: Option<usize>, // TODO: move to electrum and esplora only