Fix clippy's performance lints (#1286)

* Fix clippy perf lints

* Cargo fmt

* Add  and  to lint rule in Makefile

* Fix some leftover clippy lints
This commit is contained in:
pscott
2020-06-25 16:04:08 +02:00
committed by GitHub
parent b3c01bf09d
commit 02174e21d8
26 changed files with 82 additions and 84 deletions

View File

@@ -237,7 +237,7 @@ impl<T: BeaconChainTypes> AttestationService<T> {
&mut self,
_message_id: &MessageId,
peer_id: &PeerId,
subnet: &SubnetId,
subnet: SubnetId,
attestation: &Attestation<T::EthSpec>,
) -> bool {
// verify the attestation is on the correct subnet
@@ -249,7 +249,7 @@ impl<T: BeaconChainTypes> AttestationService<T> {
}
};
if expected_subnet != *subnet {
if expected_subnet != subnet {
warn!(self.log, "Received an attestation on the wrong subnet"; "subnet_received" => format!("{:?}", subnet), "subnet_expected" => format!("{:?}",expected_subnet), "peer_id" => format!("{}", peer_id));
return false;
}