chore: clippy

This commit is contained in:
thesimplekid
2023-09-10 20:59:57 +01:00
parent 492535879f
commit 57b6607f9a
5 changed files with 11 additions and 5 deletions

View File

@@ -37,7 +37,7 @@ impl fmt::Display for Error {
Error::TokenSpent => write!(f, "Token Spent"),
Error::TokenNotVerifed => write!(f, "Token Not Verified"),
Error::InvoiceAmountUndefined => write!(f, "Invoice without amount"),
Error::EllipticCurve(err) => write!(f, "{}", err.to_string()),
Error::EllipticCurve(err) => write!(f, "{}", err),
}
}
}

View File

@@ -121,7 +121,7 @@ pub mod wallet {
let _: Url = (&mint_url).try_into()?;
Ok(Self {
token: vec![MintProofs::new(mint_url.into(), proofs)],
token: vec![MintProofs::new(mint_url, proofs)],
memo,
})
}

View File

@@ -59,7 +59,7 @@ impl Id {
impl std::fmt::Display for Id {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut output = String::with_capacity(Self::STRLEN);
general_purpose::STANDARD.encode_string(&self.0.as_slice(), &mut output);
general_purpose::STANDARD.encode_string(self.0.as_slice(), &mut output);
f.write_str(&output)
}
}

View File

@@ -41,14 +41,14 @@ impl SplitRequest {
pub struct SplitResponse {
/// Promises to keep
#[deprecated(
since = "0.3.0",
since = "0.5.0",
note = "mint only response with one list of all promises"
)]
#[serde(skip_serializing_if = "Option::is_none")]
pub fst: Option<Vec<BlindedSignature>>,
/// Promises to send
#[deprecated(
since = "0.3.0",
since = "0.5.0",
note = "mint only response with one list of all promises"
)]
#[serde(skip_serializing_if = "Option::is_none")]

View File

@@ -9,6 +9,12 @@ use serde::{Deserialize, Serialize};
#[serde(transparent)]
pub struct Secret(String);
impl Default for Secret {
fn default() -> Self {
Self::new()
}
}
impl Secret {
const BIT_LENGTH: usize = 128;