mirror of
https://github.com/aljazceru/cdk.git
synced 2025-12-25 00:24:57 +01:00
chore(bindings): clippy fixes
This commit is contained in:
@@ -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()),
|
||||
},
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user