From 19e290a2d19143a54656149803ebe4e1beb4a4b3 Mon Sep 17 00:00:00 2001 From: Al Liu Date: Sat, 8 Jun 2024 17:57:33 +0800 Subject: [PATCH] Fix some clippy warnings --- rust/src/contract_interface.rs | 2 +- rust/src/delegate_interface.rs | 2 +- rust/src/versioning.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rust/src/contract_interface.rs b/rust/src/contract_interface.rs index c43203d..47e47ca 100644 --- a/rust/src/contract_interface.rs +++ b/rust/src/contract_interface.rs @@ -986,7 +986,7 @@ impl Display for ContractInstanceId { /// A complete key specification, that represents a cryptographic hash that identifies the contract. #[serde_as] -#[derive(Debug, Eq, Clone, Serialize, Deserialize)] +#[derive(Debug, Eq, Copy, Clone, Serialize, Deserialize)] #[cfg_attr(any(feature = "testing", test), derive(arbitrary::Arbitrary))] pub struct ContractKey { instance: ContractInstanceId, diff --git a/rust/src/delegate_interface.rs b/rust/src/delegate_interface.rs index 453c6d8..d644ef7 100644 --- a/rust/src/delegate_interface.rs +++ b/rust/src/delegate_interface.rs @@ -385,7 +385,7 @@ pub trait DelegateInterface { /// /// # Arguments /// - attested: an optional identifier for the client of this function. Usually will - /// be a [`ContractInstanceId`]. + /// be a [`ContractInstanceId`]. fn process( parameters: Parameters<'static>, attested: Option<&'static [u8]>, diff --git a/rust/src/versioning.rs b/rust/src/versioning.rs index 96b29ad..76091c0 100644 --- a/rust/src/versioning.rs +++ b/rust/src/versioning.rs @@ -219,7 +219,7 @@ impl ContractContainer { /// Return the `ContractKey` from the specific contract version. pub fn key(&self) -> ContractKey { match self { - Self::Wasm(ContractWasmAPIVersion::V1(contract_v1)) => contract_v1.key().clone(), + Self::Wasm(ContractWasmAPIVersion::V1(contract_v1)) => *contract_v1.key(), } }