From 7b33d27b308c3b322b722f91f2553115ca3cb0a1 Mon Sep 17 00:00:00 2001 From: Oleksandr Anyshchenko Date: Tue, 17 Oct 2023 12:23:17 +0100 Subject: [PATCH] fix: clippy after merge with main --- workspaces/src/error/impls.rs | 2 +- workspaces/src/types/gas_meter.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/workspaces/src/error/impls.rs b/workspaces/src/error/impls.rs index 411226f0..d6a3dd13 100644 --- a/workspaces/src/error/impls.rs +++ b/workspaces/src/error/impls.rs @@ -137,7 +137,7 @@ impl std::error::Error for Error { impl From> for Error { fn from(value: PoisonError) -> Self { - Error::custom(ErrorKind::Other, value.to_string()) + Self::custom(ErrorKind::Other, value.to_string()) } } diff --git a/workspaces/src/types/gas_meter.rs b/workspaces/src/types/gas_meter.rs index 7b75f2b6..061c09f4 100644 --- a/workspaces/src/types/gas_meter.rs +++ b/workspaces/src/types/gas_meter.rs @@ -67,8 +67,7 @@ impl GasMeter { /// Reset the gas consumed to 0. pub fn reset(&self) -> Result<()> { - let mut meter = self.gas.lock()?; - *meter = Gas::from_gas(0); + *self.gas.lock()? = Gas::from_gas(0); Ok(()) } }