Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
itegulov committed Nov 27, 2024
1 parent 558182d commit 4a564a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/node/anvil.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ impl<S: ForkSource + std::fmt::Debug + Clone + Send + Sync + 'static> AnvilNames
for InMemoryNode<S>
{
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<bool> {
Expand Down
6 changes: 3 additions & 3 deletions src/node/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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([])
}

Expand Down Expand Up @@ -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()
}
}

Expand Down

0 comments on commit 4a564a5

Please sign in to comment.