Browse Source

chore: clippy

thesimplekid 1 year ago
parent
commit
08067fb793

+ 1 - 1
bindings/cashu-ffi/src/nuts/nut06/mod.rs

@@ -2,7 +2,7 @@ use std::{ops::Deref, sync::Arc};
 
 use cashu::nuts::nut06::{SplitRequest as SplitRequestSdk, SplitResponse as SplitResponseSdk};
 
-use crate::{Amount, BlindedMessage, BlindedMessages, BlindedSignature, Proof};
+use crate::{Amount, BlindedMessage, BlindedSignature, Proof};
 
 pub struct SplitRequest {
     inner: SplitRequestSdk,

+ 1 - 0
bindings/cashu-ffi/src/nuts/nut09/mod.rs

@@ -48,6 +48,7 @@ pub struct MintInfo {
 }
 
 impl MintInfo {
+    #[allow(clippy::too_many_arguments)]
     pub fn new(
         name: Option<String>,
         pubkey: Option<Arc<PublicKey>>,

+ 2 - 2
crates/cashu-sdk/src/client/mod.rs

@@ -100,13 +100,13 @@ impl Error {
         let err = mint_res
             .error
             .as_deref()
-            .or_else(|| mint_res.detail.as_deref())
+            .or(mint_res.detail.as_deref())
             .unwrap_or_default();
 
         let mint_error = match err {
             error if error.starts_with("Lightning invoice not paid yet.") => Error::InvoiceNotPaid,
             error if error.starts_with("Lightning wallet not responding") => {
-                let mint = utils::extract_url_from_error(&error);
+                let mint = utils::extract_url_from_error(error);
                 Error::LightingWalletNotResponding(mint)
             }
             error => Error::Custom(error.to_owned()),

+ 1 - 1
crates/cashu/src/nuts/nut01.rs

@@ -134,7 +134,7 @@ pub mod mint {
     impl KeyPair {
         pub fn from_secret_key(secret_key: SecretKey) -> Self {
             Self {
-                public_key: secret_key.public_key().into(),
+                public_key: secret_key.public_key(),
                 secret_key,
             }
         }