Merge #355: Clippification: a little bit of housekeeping
ebf5a294ad5eeb9359625e941013809f5544672b gui: fix some clippy warning (Antoine Poinsot)
cf3e9cafe05d703637e09220351113d7be4458e4 ci: run clippy using Rust 1.67.1 (Antoine Poinsot)
896575842119a5e2779309edea4f9b4141126825 bitcoind: fix a clippy warning about lifetime ellision (Antoine Poinsot)
Pull request description:
FIx clippy lints and bump the clippy version for the daemon. Also fix some lints for the GUI (there are some false positives that couldn't be fixed though).
ACKs for top commit:
darosior:
self-ACK ebf5a294ad5eeb9359625e941013809f5544672b -- trivial
Tree-SHA512: 3fccbce67637d417da1758584f1d4f027e1536054b21c7abafc2e6b70e65901abb373a1ffc7fc7efbbbdf5c504ccde9df75e477d72ecd46a8b7798ce7985f64d
This commit is contained in:
commit
2dea4b1a6c
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@ -9,7 +9,7 @@ jobs:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: 1.66.0
|
||||
toolchain: 1.67.1
|
||||
components: rustfmt, clippy
|
||||
override: true
|
||||
- name: rustfmt
|
||||
|
||||
@ -172,7 +172,7 @@ impl State for Home {
|
||||
Message::View(view::Message::Next) => {
|
||||
if let Some(last) = self.events.last() {
|
||||
let daemon = daemon.clone();
|
||||
let last_event_date = last.time.unwrap() as u32;
|
||||
let last_event_date = last.time.unwrap();
|
||||
return Command::perform(
|
||||
async move {
|
||||
let mut limit = view::home::HISTORY_EVENT_PAGE_SIZE;
|
||||
@ -284,7 +284,7 @@ impl State for ReceivePanel {
|
||||
match res {
|
||||
Ok(address) => {
|
||||
self.warning = None;
|
||||
self.qr_code = Some(qr_code::State::new(&address.to_qr_uri()).unwrap());
|
||||
self.qr_code = Some(qr_code::State::new(address.to_qr_uri()).unwrap());
|
||||
self.address = Some(address);
|
||||
}
|
||||
Err(e) => self.warning = Some(e),
|
||||
|
||||
@ -96,7 +96,7 @@ impl<C: Client + Debug> Daemon for Lianad<C> {
|
||||
}
|
||||
|
||||
fn update_spend_tx(&self, psbt: &Psbt) -> Result<(), DaemonError> {
|
||||
let spend_tx = base64::encode(&consensus::serialize(psbt));
|
||||
let spend_tx = base64::encode(consensus::serialize(psbt));
|
||||
let _res: serde_json::value::Value = self.call("updatespend", Some(vec![spend_tx]))?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@ -343,11 +343,11 @@ impl BitcoinD {
|
||||
}
|
||||
}
|
||||
|
||||
fn make_request_inner<'a, 'b>(
|
||||
fn make_request_inner(
|
||||
&self,
|
||||
client: &Client,
|
||||
method: &'a str,
|
||||
params: &'b [Box<serde_json::value::RawValue>],
|
||||
method: &str,
|
||||
params: &[Box<serde_json::value::RawValue>],
|
||||
retry: bool,
|
||||
) -> Result<Json, BitcoindError> {
|
||||
let req = client.build_request(method, params);
|
||||
@ -358,11 +358,11 @@ impl BitcoinD {
|
||||
}
|
||||
}
|
||||
|
||||
fn make_request<'a, 'b>(
|
||||
fn make_request(
|
||||
&self,
|
||||
client: &Client,
|
||||
method: &'a str,
|
||||
params: &'b [Box<serde_json::value::RawValue>],
|
||||
method: &str,
|
||||
params: &[Box<serde_json::value::RawValue>],
|
||||
) -> Result<Json, BitcoindError> {
|
||||
self.make_request_inner(client, method, params, true)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user