Bläddra i källkod

chore: clippy

thesimplekid 1 år sedan
förälder
incheckning
357479827d

+ 1 - 4
crates/cashu-sdk/src/wallet/localstore/memory.rs

@@ -212,10 +212,7 @@ impl LocalStore for MemoryLocalStore {
     }
 
     async fn add_keyset_counter(&self, keyset_id: &Id, count: u64) -> Result<(), Error> {
-        self.keyset_counter
-            .lock()
-            .await
-            .insert(keyset_id.clone(), count);
+        self.keyset_counter.lock().await.insert(*keyset_id, count);
         Ok(())
     }
 

+ 3 - 3
crates/cashu-sdk/src/wallet/mod.rs

@@ -69,7 +69,7 @@ impl<C: Client, L: LocalStore> Wallet<C, L> {
 
     /// Back up seed
     pub fn mnemonic(&self) -> Option<Mnemonic> {
-        self.mnemonic.clone().map(|b| b)
+        self.mnemonic.clone()
     }
 
     pub async fn mint_balances(&self) -> Result<HashMap<UncheckedUrl, Amount>, Error> {
@@ -306,7 +306,7 @@ impl<C: Client, L: LocalStore> Wallet<C, L> {
                 PreMintSecrets::from_seed(
                     active_keyset_id,
                     count,
-                    &mnemonic,
+                    mnemonic,
                     quote_info.amount,
                     false,
                 )?
@@ -704,7 +704,7 @@ impl<C: Client, L: LocalStore> Wallet<C, L> {
                     .unwrap_or(0);
 
                 counter = Some(count);
-                PreMintSecrets::from_seed(active_keyset_id, count, &mnemonic, proofs_amount, true)?
+                PreMintSecrets::from_seed(active_keyset_id, count, mnemonic, proofs_amount, true)?
             }
             None => PreMintSecrets::blank(active_keyset_id, proofs_amount)?,
         };