Skip to content

Commit

Permalink
Fix a few clippy nits
Browse files Browse the repository at this point in the history
  • Loading branch information
romanz committed Apr 24, 2023
1 parent 7d521f8 commit f3dd804
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/daemon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ impl Daemon {
#[derive(serde::Serialize)]
#[serde(transparent)]
struct TxAsHex(#[serde(with = "With::<Hex<Lower>>")] Transaction);
serde_json::to_value(&TxAsHex(tx)).map_err(Into::into)
serde_json::to_value(TxAsHex(tx)).map_err(Into::into)
}

pub(crate) fn get_transaction(
Expand Down
4 changes: 2 additions & 2 deletions src/signals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub(crate) struct Signal {

impl Signal {
pub fn new() -> Signal {
let ids = [
let ids = vec![
SIGINT, SIGTERM,
SIGUSR1, // allow external triggering (e.g. via bitcoind `blocknotify`)
];
Expand All @@ -65,7 +65,7 @@ impl Signal {
};

let exit_flag = result.exit.clone();
let mut signals = Signals::new(&ids).expect("failed to register signal hook");
let mut signals = Signals::new(ids).expect("failed to register signal hook");
spawn("signal", move || {
for id in &mut signals {
info!("notified via SIG{}", id);
Expand Down

0 comments on commit f3dd804

Please sign in to comment.