Skip to content

Commit a82a99c

Browse files
committed
Clippy fixes
1 parent 62fdaf5 commit a82a99c

File tree

5 files changed

+21
-25
lines changed

5 files changed

+21
-25
lines changed

app/app.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,7 @@ impl App {
165165
.await?
166166
{
167167
return Err(tonic::Status::aborted(format!(
168-
"{} is not supported in mainchain client",
169-
validator_service_name
168+
"{validator_service_name} is not supported in mainchain client",
170169
)));
171170
}
172171

app/gui/coins/tx_builder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ impl TxBuilder {
4444
self.tx_creator.value_in = value_in;
4545
spent_utxos.sort_by_key(|(outpoint, _)| format!("{outpoint}"));
4646
ui.separator();
47-
ui.monospace(format!("Total: {}", value_in));
47+
ui.monospace(format!("Total: {value_in}"));
4848
ui.separator();
4949
egui::Grid::new("utxos").striped(true).show(ui, |ui| {
5050
ui.monospace("kind");
@@ -73,7 +73,7 @@ impl TxBuilder {
7373
let value_out: bitcoin::Amount =
7474
self.base_tx.outputs.iter().map(GetValue::get_value).sum();
7575
self.tx_creator.value_out = value_out;
76-
ui.monospace(format!("Total: {}", value_out));
76+
ui.monospace(format!("Total: {value_out}"));
7777
ui.separator();
7878
egui::Grid::new("outputs").striped(true).show(ui, |ui| {
7979
let mut remove = None;

app/gui/coins/utxo_selector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ impl UtxoSelector {
3636
})
3737
.unwrap_or_default();
3838
ui.separator();
39-
ui.monospace(format!("Total: {}", total));
39+
ui.monospace(format!("Total: {total}"));
4040
ui.separator();
4141
egui::Grid::new("utxos").striped(true).show(ui, |ui| {
4242
ui.monospace("kind");

lib/net/peer/mod.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -423,12 +423,11 @@ pub fn connect(
423423
}
424424
};
425425
let task = spawn(async move {
426-
if let Err(err) = connection_task().await {
427-
if let Err(send_error) = info_tx.unbounded_send(err.into())
428-
&& let Info::Error(err) = send_error.into_inner()
429-
{
430-
tracing::warn!("Failed to send error to receiver: {err}")
431-
}
426+
if let Err(err) = connection_task().await
427+
&& let Err(send_error) = info_tx.unbounded_send(err.into())
428+
&& let Info::Error(err) = send_error.into_inner()
429+
{
430+
tracing::warn!("Failed to send error to receiver: {err}")
432431
}
433432
});
434433
let connection_handle = ConnectionHandle {

lib/state/two_way_peg_data.rs

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -482,21 +482,19 @@ pub fn connect(
482482
.try_get(rwtxn, &())
483483
.map_err(DbError::from)?
484484
.is_none()
485-
{
486-
if let Some(bundle) =
485+
&& let Some(bundle) =
487486
collect_withdrawal_bundle(state, rwtxn, block_height)?
488-
{
489-
let m6id = bundle.compute_m6id();
490-
state
491-
.pending_withdrawal_bundle
492-
.put(rwtxn, &(), &(bundle, block_height))
493-
.map_err(DbError::from)?;
494-
tracing::trace!(
495-
%block_height,
496-
%m6id,
497-
"Stored pending withdrawal bundle"
498-
);
499-
}
487+
{
488+
let m6id = bundle.compute_m6id();
489+
state
490+
.pending_withdrawal_bundle
491+
.put(rwtxn, &(), &(bundle, block_height))
492+
.map_err(DbError::from)?;
493+
tracing::trace!(
494+
%block_height,
495+
%m6id,
496+
"Stored pending withdrawal bundle"
497+
);
500498
}
501499
let () = accumulator.apply_diff(accumulator_diff)?;
502500
state

0 commit comments

Comments
 (0)