chore: clippy

This commit is contained in:
thesimplekid
2023-09-02 12:50:59 +01:00
parent 19f6e24dfe
commit 08067fb793
4 changed files with 5 additions and 4 deletions

View File

@@ -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,

View File

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

View File

@@ -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()),

View File

@@ -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,
}
}