From 1bc262bbc7b55d037ef8f01845efacd6e7f97d88 Mon Sep 17 00:00:00 2001 From: orion Date: Tue, 8 Nov 2022 18:06:55 +0100 Subject: [PATCH] fix clippy --- app-libs/stf/src/lib.rs | 2 +- core-primitives/stf-executor/src/mocks.rs | 2 +- service/src/enclave/tls_ra.rs | 2 +- sidechain/test/src/sidechain_block_builder.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app-libs/stf/src/lib.rs b/app-libs/stf/src/lib.rs index 8f85736a6b..07aa78bb90 100644 --- a/app-libs/stf/src/lib.rs +++ b/app-libs/stf/src/lib.rs @@ -81,7 +81,7 @@ pub enum StfError { StorageHashMismatch, InvalidStorageDiff, } - +#[allow(clippy::large_enum_variant)] #[derive(Clone)] pub enum KeyPair { Sr25519(sr25519::Pair), diff --git a/core-primitives/stf-executor/src/mocks.rs b/core-primitives/stf-executor/src/mocks.rs index 689599aeb5..f2c7eb2ade 100644 --- a/core-primitives/stf-executor/src/mocks.rs +++ b/core-primitives/stf-executor/src/mocks.rs @@ -127,7 +127,7 @@ impl StfEnclaveSigning for StfEnclaveSignerMock { trusted_call: &TrustedCall, shard: &ShardIdentifier, ) -> Result { - Ok(trusted_call.sign(&KeyPair::Ed25519(self.signer.clone()), 1, &self.mr_enclave, shard)) + Ok(trusted_call.sign(&KeyPair::Ed25519(self.signer), 1, &self.mr_enclave, shard)) } } diff --git a/service/src/enclave/tls_ra.rs b/service/src/enclave/tls_ra.rs index 38e3f25238..26f29e5667 100644 --- a/service/src/enclave/tls_ra.rs +++ b/service/src/enclave/tls_ra.rs @@ -19,7 +19,7 @@ use itp_types::ShardIdentifier; use log::*; use sgx_types::*; use std::{ - net::{self, TcpListener}, + net::{TcpListener, TcpStream}, os::unix::io::AsRawFd, }; diff --git a/sidechain/test/src/sidechain_block_builder.rs b/sidechain/test/src/sidechain_block_builder.rs index 05396ee1ce..5db5ab62eb 100644 --- a/sidechain/test/src/sidechain_block_builder.rs +++ b/sidechain/test/src/sidechain_block_builder.rs @@ -76,7 +76,7 @@ impl SidechainBlockBuilder { } pub fn build_signed(self) -> SignedBlock { - let signer = self.signer.clone(); + let signer = self.signer; self.build().sign_block(&signer) } }