From 4a564a55f233ed36dcfe9fcfc5f2b3a6402124f7 Mon Sep 17 00:00:00 2001 From: Daniyar Itegulov Date: Wed, 27 Nov 2024 22:07:08 +1100 Subject: [PATCH] clippy --- src/node/anvil.rs | 3 ++- src/node/time.rs | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/node/anvil.rs b/src/node/anvil.rs index 36fe82d6..96ef63a2 100644 --- a/src/node/anvil.rs +++ b/src/node/anvil.rs @@ -13,7 +13,8 @@ impl AnvilNames for InMemoryNode { fn set_block_timestamp_interval(&self, seconds: u64) -> RpcResult<()> { - Ok(self.time.set_block_timestamp_interval(seconds)).into_boxed_future() + self.time.set_block_timestamp_interval(seconds); + Ok(()).into_boxed_future() } fn remove_block_timestamp_interval(&self) -> RpcResult { diff --git a/src/node/time.rs b/src/node/time.rs index c189a2fc..71717785 100644 --- a/src/node/time.rs +++ b/src/node/time.rs @@ -103,7 +103,7 @@ impl TimestampManager { /// /// Use this method when you need to ensure that no one else can access [`TimeManager`] during /// this view's lifetime. - pub fn lock<'a>(&'a self) -> impl TimeExclusive + 'a { + pub fn lock(&self) -> impl TimeExclusive + '_ { self.lock_with_offsets([]) } @@ -131,11 +131,11 @@ impl TimestampManager { impl TimeRead for TimestampManager { fn last_timestamp(&self) -> u64 { - (&*self.get()).last_timestamp() + (*self.get()).last_timestamp() } fn peek_next_timestamp(&self) -> u64 { - (&*self.get()).peek_next_timestamp() + (*self.get()).peek_next_timestamp() } }