Skip to content

Commit

Permalink
Fix new clippy warnings on Rust 1.74
Browse files Browse the repository at this point in the history
  • Loading branch information
romac committed Oct 5, 2023
1 parent 9e27e1e commit 95fda39
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
3 changes: 1 addition & 2 deletions crates/relayer-cli/src/commands/listen.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use alloc::sync::Arc;
use core::{
fmt::{Display, Error as FmtError, Formatter},
ops::Deref,
str::FromStr,
};
use std::thread;
Expand Down Expand Up @@ -97,7 +96,7 @@ impl ListenCmd {
impl Runnable for ListenCmd {
fn run(&self) {
self.cmd()
.unwrap_or_else(|e| fatal_error(app_reader().deref(), &*e));
.unwrap_or_else(|e| fatal_error(app_reader(), &*e));
}
}

Expand Down
18 changes: 9 additions & 9 deletions crates/relayer-cli/src/commands/tx/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -434,18 +434,18 @@ impl Runnable for TxUpgradeClientsCmd {
let results = config
.chains
.iter()
.filter_map(|chain| {
.filter(|&chain| {
(self.reference_chain_id != chain.id

Check failure on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / clippy-no-default-features

unnecessary parentheses around block return value

error: unnecessary parentheses around block return value --> crates/relayer-cli/src/commands/tx/client.rs:438:17 | 438 | (self.reference_chain_id != chain.id | ^ 439 | && (self.host_chain_id.is_none() 440 | || self.host_chain_id == Some(chain.id.clone()))) | ^ | = note: `-D unused-parens` implied by `-D warnings` help: remove these parentheses | 438 ~ self.reference_chain_id != chain.id 439 | && (self.host_chain_id.is_none() 440 ~ || self.host_chain_id == Some(chain.id.clone())) |

Check failure on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / clippy-no-default-features

unnecessary parentheses around block return value

error: unnecessary parentheses around block return value --> crates/relayer-cli/src/commands/tx/client.rs:438:17 | 438 | (self.reference_chain_id != chain.id | ^ 439 | && (self.host_chain_id.is_none() 440 | || self.host_chain_id == Some(chain.id.clone()))) | ^ | = note: `-D unused-parens` implied by `-D warnings` help: remove these parentheses | 438 ~ self.reference_chain_id != chain.id 439 | && (self.host_chain_id.is_none() 440 ~ || self.host_chain_id == Some(chain.id.clone())) |

Check failure on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / clippy-all-features

unnecessary parentheses around block return value

error: unnecessary parentheses around block return value --> crates/relayer-cli/src/commands/tx/client.rs:438:17 | 438 | (self.reference_chain_id != chain.id | ^ 439 | && (self.host_chain_id.is_none() 440 | || self.host_chain_id == Some(chain.id.clone()))) | ^ | = note: `-D unused-parens` implied by `-D warnings` help: remove these parentheses | 438 ~ self.reference_chain_id != chain.id 439 | && (self.host_chain_id.is_none() 440 ~ || self.host_chain_id == Some(chain.id.clone())) |

Check failure on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / clippy-all-features

unnecessary parentheses around block return value

error: unnecessary parentheses around block return value --> crates/relayer-cli/src/commands/tx/client.rs:438:17 | 438 | (self.reference_chain_id != chain.id | ^ 439 | && (self.host_chain_id.is_none() 440 | || self.host_chain_id == Some(chain.id.clone()))) | ^ | = note: `-D unused-parens` implied by `-D warnings` help: remove these parentheses | 438 ~ self.reference_chain_id != chain.id 439 | && (self.host_chain_id.is_none() 440 ~ || self.host_chain_id == Some(chain.id.clone())) |

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / cargo-doc

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / model-based-test (gaia6)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / test-stable

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / test-stable

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / test-stable

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / test-stable

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / fee-grant (evmos, evmosd, evmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / fee-grant (evmos, evmosd, evmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / misbehaviour (gaia11, gaiad, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / misbehaviour (gaia11, gaiad, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / misbehaviour (gaia11, gaiad, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / misbehaviour (gaia11, gaiad, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / misbehaviour (gaia11, gaiad, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / misbehaviour (gaia11, gaiad, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / misbehaviour (gaia11, gaiad, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / misbehaviour (gaia11, gaiad, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / misbehaviour (gaia11, gaiad, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / fee-grant (stride, strided, stride)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / fee-grant (stride, strided, stride)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / clean-workers (gaia11, gaiad, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / clean-workers (gaia11, gaiad, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / ics31 (.#gaia11 .#stride-no-admin, gaiad,strided, cosmos,stride)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / ics31 (.#gaia11 .#stride-no-admin, gaiad,strided, cosmos,stride)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / interchain-security-icq (stride-consumer-no-admin, strided, stride)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / interchain-security-icq (stride-consumer-no-admin, strided, stride)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / ordered-channel-test

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / ordered-channel-test

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / ica-filter-test (ibc-go-v7-simapp, simd, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / ica-filter-test (ibc-go-v7-simapp, simd, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / template-checker

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / interchain-security-ica (stride-consumer, strided, stride)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / interchain-security-ica (stride-consumer, strided, stride)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / ics29-fee-test (ibc-go-v7-simapp, simd, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / ics29-fee-test (ibc-go-v7-simapp, simd, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / ica-filter-test (ibc-go-v6-simapp, simd, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / ica-filter-test (ibc-go-v6-simapp, simd, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / ics29-fee-test (ibc-go-v6-simapp, simd, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / ics29-fee-test (ibc-go-v6-simapp, simd, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / forward-packet (gaia11, gaiad, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / forward-packet (gaia11, gaiad, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / interchain-security-no-ica (neutron, neutrond, neutron)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / interchain-security-no-ica (neutron, neutrond, neutron)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / ics29-fee-test (ibc-go-v5-simapp, simd, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / ics29-fee-test (ibc-go-v5-simapp, simd, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / ics29-fee-test (migaloo, migalood, migaloo)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / ics29-fee-test (migaloo, migalood, migaloo)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / forward-packet (juno, junod, juno)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / forward-packet (juno, junod, juno)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / integration-test (gaia11, gaiad, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / integration-test (gaia11, gaiad, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / integration-test (evmos, evmosd, evmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / integration-test (evmos, evmosd, evmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / integration-test (stride, strided, stride)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / integration-test (stride, strided, stride)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / integration-test (ibc-go-v7-simapp, simd, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / integration-test (ibc-go-v7-simapp, simd, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / integration-test (ibc-go-v4-simapp, simd, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / integration-test (ibc-go-v4-simapp, simd, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / integration-test (ibc-go-v5-simapp, simd, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / integration-test (ibc-go-v5-simapp, simd, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / integration-test (juno, junod, juno)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / integration-test (juno, junod, juno)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / integration-test (wasmd, wasmd, wasm)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / integration-test (wasmd, wasmd, wasm)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / integration-test (osmosis, osmosisd, osmo)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / integration-test (osmosis, osmosisd, osmo)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / integration-test (ibc-go-v6-simapp, simd, cosmos)

unnecessary parentheses around block return value

Check warning on line 438 in crates/relayer-cli/src/commands/tx/client.rs

View workflow job for this annotation

GitHub Actions / integration-test (ibc-go-v6-simapp, simd, cosmos)

unnecessary parentheses around block return value
&& (self.host_chain_id.is_none()
|| self.host_chain_id == Some(chain.id.clone())))
.then(|| {
self.upgrade_clients_for_chain(
&config,
reference_chain.clone(),
&chain.id,
reference_upgrade_height,
)
})
})
.map(|chain| {
self.upgrade_clients_for_chain(
&config,
reference_chain.clone(),
&chain.id,
reference_upgrade_height,
)
})
.collect();

Expand Down

0 comments on commit 95fda39

Please sign in to comment.