chore(bindings): clippy fixes

This commit is contained in:
thesimplekid
2024-05-06 21:46:49 +01:00
parent 21c8b18dc4
commit 8cbdaf39cc
5 changed files with 8 additions and 8 deletions

View File

@@ -34,7 +34,7 @@ impl JsBlindSignature {
inner: BlindSignature {
keyset_id: *keyset_id.deref(),
amount: *amount.deref(),
c: c.deref().clone(),
c: *c.deref(),
dleq: dleq.map(|b| b.deref().clone()),
},
}

View File

@@ -39,7 +39,7 @@ impl JsBlindedMessage {
inner: BlindedMessage {
keyset_id: *keyset_id.deref(),
amount: *amount.deref(),
blinded_secret: blinded_secret.deref().clone(),
blinded_secret: *blinded_secret.deref(),
witness: witness.map(|w| w.deref().clone()),
},
}
@@ -60,7 +60,7 @@ impl JsBlindedMessage {
/// Blinded Secret
#[wasm_bindgen(getter)]
pub fn blinded_secret(&self) -> JsPublicKey {
self.inner.blinded_secret.clone().into()
self.inner.blinded_secret.into()
}
/// Witness

View File

@@ -42,7 +42,7 @@ impl JsProof {
inner: Proof {
amount: *amount.deref(),
secret: secret.deref().clone(),
c: c.deref().clone(),
c: *c.deref(),
keyset_id: *keyset_id.deref(),
witness: witness.map(|w| w.deref().clone()),
dleq: dleq.map(|d| d.deref().clone()),
@@ -65,7 +65,7 @@ impl JsProof {
/// C
#[wasm_bindgen(getter)]
pub fn c(&self) -> JsPublicKey {
self.inner.c.clone().into()
self.inner.c.into()
}
/// Keyset Id

View File

@@ -81,7 +81,7 @@ impl JsMintInfo {
Ok(JsMintInfo {
inner: MintInfo {
name,
pubkey: pubkey.map(|p| p.deref().clone()),
pubkey: pubkey.map(|p| *p.deref()),
version: version.map(|v| v.deref().clone()),
description,
description_long,
@@ -101,7 +101,7 @@ impl JsMintInfo {
/// Get Pubkey
#[wasm_bindgen(getter)]
pub fn pubkey(&self) -> Option<JsPublicKey> {
self.inner.pubkey.clone().map(|p| p.into())
self.inner.pubkey.map(|p| p.into())
}
/// Get Version

View File

@@ -36,7 +36,7 @@ impl JsAmount {
#[wasm_bindgen(constructor)]
pub fn new(sats: u64) -> Self {
Self {
inner: Amount::from(sats as u64),
inner: Amount::from(sats),
}
}