mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-01 03:33:47 +00:00
Fix clippy warnings (#813)
* Clippy account manager * Clippy account_manager * Clippy beacon_node/beacon_chain * Clippy beacon_node/client * Clippy beacon_node/eth1 * Clippy beacon_node/eth2-libp2p * Clippy beacon_node/genesis * Clippy beacon_node/network * Clippy beacon_node/rest_api * Clippy beacon_node/src * Clippy beacon_node/store * Clippy eth2/lmd_ghost * Clippy eth2/operation_pool * Clippy eth2/state_processing * Clippy eth2/types * Clippy eth2/utils/bls * Clippy eth2/utils/cahced_tree_hash * Clippy eth2/utils/deposit_contract * Clippy eth2/utils/eth2_interop_keypairs * Clippy eth2/utils/eth2_testnet_config * Clippy eth2/utils/lighthouse_metrics * Clippy eth2/utils/ssz * Clippy eth2/utils/ssz_types * Clippy eth2/utils/tree_hash_derive * Clippy lcli * Clippy tests/beacon_chain_sim * Clippy validator_client * Cargo fmt
This commit is contained in:
@@ -156,7 +156,7 @@ fn run_new_validator_subcommand<T: EthSpec>(
|
||||
})
|
||||
.map(|password| {
|
||||
// Trim the line feed from the end of the password file, if present.
|
||||
if password.ends_with("\n") {
|
||||
if password.ends_with('\n') {
|
||||
password[0..password.len() - 1].to_string()
|
||||
} else {
|
||||
password
|
||||
@@ -337,7 +337,7 @@ fn deposit_validators<E: EthSpec>(
|
||||
.map(|_| event_loop)
|
||||
})
|
||||
// Web3 gives errors if the event loop is dropped whilst performing requests.
|
||||
.map(|event_loop| drop(event_loop))
|
||||
.map(drop)
|
||||
}
|
||||
|
||||
/// For the given `ValidatorDirectory`, submit a deposit transaction to the `web3` node.
|
||||
@@ -367,7 +367,7 @@ fn deposit_validator(
|
||||
.into_future()
|
||||
.and_then(move |(voting_keypair, deposit_data)| {
|
||||
let pubkey_1 = voting_keypair.pk.clone();
|
||||
let pubkey_2 = voting_keypair.pk.clone();
|
||||
let pubkey_2 = voting_keypair.pk;
|
||||
|
||||
let web3_1 = web3.clone();
|
||||
let web3_2 = web3.clone();
|
||||
@@ -421,7 +421,7 @@ fn deposit_validator(
|
||||
to: Some(deposit_contract),
|
||||
gas: Some(U256::from(DEPOSIT_GAS)),
|
||||
gas_price: None,
|
||||
value: Some(U256::from(from_gwei(deposit_amount))),
|
||||
value: Some(from_gwei(deposit_amount)),
|
||||
data: Some(deposit_data.into()),
|
||||
nonce: None,
|
||||
condition: None,
|
||||
|
||||
Reference in New Issue
Block a user