mirror of
https://github.com/aljazceru/cdk.git
synced 2026-02-05 05:06:14 +01:00
chore: clippy
This commit is contained in:
@@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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")]
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user