Explorar el Código

Clippy issues

Cesar Rodas hace 11 meses
padre
commit
215ee651ce
Se han modificado 2 ficheros con 4 adiciones y 4 borrados
  1. 3 3
      utxo/src/ledger.rs
  2. 1 1
      utxo/src/worker.rs

+ 3 - 3
utxo/src/ledger.rs

@@ -99,9 +99,9 @@ impl Worker for Broadcaster {
             for to_rebuild in &subscriptions_to_reindex {
                 if let Some(list_of_senders) = listeners.get_mut(to_rebuild) {
                     *list_of_senders = list_of_senders
-                        .into_iter()
+                        .iter()
                         .filter(|x| senders.contains_key(*x))
-                        .map(|x| *x)
+                        .copied()
                         .collect::<Vec<_>>();
                 }
             }
@@ -282,7 +282,7 @@ where
     async fn persist(&self, mut transaction: Transaction) -> Result<Transaction, Error> {
         transaction.persist(&self.config).await?;
 
-        let _ = self.brodcaster.send(transaction.clone());
+        self.brodcaster.send(transaction.clone());
         Ok(transaction)
     }
 

+ 1 - 1
utxo/src/worker.rs

@@ -68,7 +68,7 @@ impl<W: Worker + 'static> WorkerManager<W> {
                     _ = sleep(Duration::from_millis(CHECK_WORKER_IN_SCOPE_MS))  => {}
                 }
 
-                if worker_in_scope.load(std::sync::atomic::Ordering::Acquire) == false {
+                if !worker_in_scope.load(std::sync::atomic::Ordering::Acquire) {
                     break;
                 }
             }