perf(contract): remove clone (#602)

This commit is contained in:
univerz 2021-11-21 17:12:49 +01:00 committed by GitHub
parent a28476dccc
commit a68f4ec9a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 5 deletions

View File

@ -146,11 +146,8 @@ where
/// ///
/// Note: this function _does not_ send a transaction from your account /// Note: this function _does not_ send a transaction from your account
pub async fn call(&self) -> Result<D, ContractError<M>> { pub async fn call(&self) -> Result<D, ContractError<M>> {
let bytes = self let bytes =
.client self.client.call(&self.tx, self.block).await.map_err(ContractError::MiddlewareError)?;
.call(&self.tx.clone(), self.block)
.await
.map_err(ContractError::MiddlewareError)?;
// decode output // decode output
let data = decode_function_data(&self.function, &bytes, false)?; let data = decode_function_data(&self.function, &bytes, false)?;