mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-11 18:04:18 +00:00
Add various fixes to clippy lints
Thou shalt appease clippy
This commit is contained in:
@@ -57,12 +57,12 @@ impl Config {
|
||||
|
||||
pub fn apply_cli_args(&mut self, args: &ArgMatches) -> Result<(), &'static str> {
|
||||
if let Some(listen_address_str) = args.value_of("listen-address") {
|
||||
let listen_addresses = listen_address_str.split(",").map(Into::into).collect();
|
||||
let listen_addresses = listen_address_str.split(',').map(Into::into).collect();
|
||||
self.listen_addresses = listen_addresses;
|
||||
}
|
||||
|
||||
if let Some(boot_addresses_str) = args.value_of("boot-nodes") {
|
||||
let boot_addresses = boot_addresses_str.split(",").map(Into::into).collect();
|
||||
let boot_addresses = boot_addresses_str.split(',').map(Into::into).collect();
|
||||
self.boot_nodes = boot_addresses;
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ impl RequestId {
|
||||
}
|
||||
|
||||
/// Return the previous id.
|
||||
pub fn previous(&self) -> Self {
|
||||
pub fn previous(self) -> Self {
|
||||
Self(self.0 - 1)
|
||||
}
|
||||
}
|
||||
@@ -220,7 +220,7 @@ impl Encode for RPCEvent {
|
||||
} => SszContainer {
|
||||
is_request: true,
|
||||
id: (*id).into(),
|
||||
other: (*method_id).into(),
|
||||
other: *method_id,
|
||||
bytes: match body {
|
||||
RPCRequest::Hello(body) => body.as_ssz_bytes(),
|
||||
RPCRequest::Goodbye(body) => body.as_ssz_bytes(),
|
||||
@@ -237,7 +237,7 @@ impl Encode for RPCEvent {
|
||||
} => SszContainer {
|
||||
is_request: false,
|
||||
id: (*id).into(),
|
||||
other: (*method_id).into(),
|
||||
other: *method_id,
|
||||
bytes: match result {
|
||||
RPCResponse::Hello(response) => response.as_ssz_bytes(),
|
||||
RPCResponse::BeaconBlockRoots(response) => response.as_ssz_bytes(),
|
||||
|
||||
Reference in New Issue
Block a user