Skip to content

Commit a8d49b3

Browse files
committed
chore: clippy and fmt
1 parent f29150f commit a8d49b3

File tree

5 files changed

+7
-15
lines changed

5 files changed

+7
-15
lines changed

harbor-client/Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ url = "2.5.0"
3131
cdk = { version = "0.12.0", default-features = false, features = ["wallet", "bip353"] }
3232
cdk-sqlite = { version = "0.12.0", default-features = false, features = ["wallet", "sqlcipher"] }
3333

34-
# cdk = { git = "https://github.com/thesimplekid/cdk", branch = "bip353_examples", default-features = false, features = ["wallet", "bip353"] }
35-
# cdk-sqlite = { git = "https://github.com/thesimplekid/cdk/", branch = "bip353_examples", default-features = false, features = ["wallet", "sqlcipher"] }
36-
37-
3834
bitcoin = { version = "0.32.4", features = ["base64"] }
3935
bip39 = "2.0.0"
4036

harbor-client/src/cashu_client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,8 @@ pub fn spawn_lightning_payment_thread(
253253
quote.id,
254254
outgoing.preimage
255255
);
256-
let preimage: [u8; 32] = FromHex::from_hex(&outgoing.preimage.unwrap_or_default())
257-
.unwrap_or_else(|_| [0u8; 32]);
256+
let preimage: [u8; 32] =
257+
FromHex::from_hex(&outgoing.preimage.unwrap_or_default()).unwrap_or([0u8; 32]);
258258
let params = if is_transfer {
259259
SendSuccessMsg::Transfer
260260
} else {

harbor-client/src/db_models/schema.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ diesel::table! {
1010
}
1111
}
1212

13-
1413
diesel::table! {
1514
cashu_mint (mint_url) {
1615
mint_url -> Text,
@@ -134,4 +133,3 @@ diesel::allow_tables_to_appear_in_same_query!(
134133
on_chain_receives,
135134
profile,
136135
);
137-

harbor-client/src/fedimint_client.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -422,8 +422,8 @@ pub(crate) async fn spawn_invoice_receive_subscription(
422422
)
423423
.await;
424424

425-
if let Err(e) =
426-
storage.mark_ln_receive_as_success(operation_id.fmt_full().to_string(), None)
425+
if let Err(e) = storage
426+
.mark_ln_receive_as_success(operation_id.fmt_full().to_string(), None)
427427
{
428428
error!("Could not mark lightning receive as success: {e}");
429429
}
@@ -485,8 +485,8 @@ pub(crate) async fn spawn_lnv2_receive_subscription(
485485
)
486486
.await;
487487

488-
if let Err(e) =
489-
storage.mark_ln_receive_as_success(operation_id.fmt_full().to_string(), None)
488+
if let Err(e) = storage
489+
.mark_ln_receive_as_success(operation_id.fmt_full().to_string(), None)
490490
{
491491
error!("Could not mark lightning receive as success: {e}");
492492
}

harbor-ui/src/routes/receive.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@ pub fn receive(harbor: &HarborWallet) -> Element<Message> {
1515
Some(invoice.to_string())
1616
} else if let Some(address) = &harbor.receive_address {
1717
Some(address.to_string())
18-
} else if let Some(offer) = &harbor.receive_bolt12_offer {
19-
Some(offer.clone())
2018
} else {
21-
None
19+
harbor.receive_bolt12_offer.clone()
2220
};
2321

2422
if let Some(receive_string) = receive_string {

0 commit comments

Comments
 (0)