From 85dd2106bdc3476c0eb73c97f2f4b338a3486749 Mon Sep 17 00:00:00 2001 From: Botahamec Date: Fri, 20 Dec 2024 18:28:08 -0500 Subject: Fix clippy issues --- src/rwlock/write_lock.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/rwlock/write_lock.rs') diff --git a/src/rwlock/write_lock.rs b/src/rwlock/write_lock.rs index 15eaacc..77b68c8 100644 --- a/src/rwlock/write_lock.rs +++ b/src/rwlock/write_lock.rs @@ -6,7 +6,7 @@ use crate::key::Keyable; use super::{RwLock, RwLockWriteGuard, WriteLock}; -impl<'l, T: ?Sized + Debug, R: RawRwLock> Debug for WriteLock<'l, T, R> { +impl Debug for WriteLock<'_, T, R> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { // safety: this is just a try lock, and the value is dropped // immediately after, so there's no risk of blocking ourselves @@ -36,7 +36,7 @@ impl<'l, T, R> From<&'l RwLock> for WriteLock<'l, T, R> { } } -impl<'l, T: ?Sized, R> AsRef> for WriteLock<'l, T, R> { +impl AsRef> for WriteLock<'_, T, R> { fn as_ref(&self) -> &RwLock { self.0 } @@ -59,13 +59,13 @@ impl<'l, T, R> WriteLock<'l, T, R> { } } -impl<'l, T: ?Sized, R: RawRwLock> WriteLock<'l, T, R> { +impl WriteLock<'_, T, R> { /// Locks the underlying [`RwLock`] with exclusive write access, blocking /// the current until it can be acquired. pub fn lock<'s, 'key: 's, Key: Keyable + 'key>( &'s self, key: Key, - ) -> RwLockWriteGuard<'_, 'key, T, Key, R> { + ) -> RwLockWriteGuard<'s, 'key, T, Key, R> { self.0.write(key) } @@ -73,7 +73,7 @@ impl<'l, T: ?Sized, R: RawRwLock> WriteLock<'l, T, R> { pub fn try_lock<'s, 'key: 's, Key: Keyable + 'key>( &'s self, key: Key, - ) -> Option> { + ) -> Option> { self.0.try_write(key) } -- cgit v1.2.3