Skip to content

Commit

Permalink
cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Lupus committed Dec 13, 2024
1 parent b15fe75 commit 312c459
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ enum LockReadGuard<'a, T> {
RwLockRead(RwLockReadGuard<'a, T>),
}

impl<'a, T> Deref for LockReadGuard<'a, T> {
impl<T> Deref for LockReadGuard<'_, T> {
type Target = T;

fn deref(&self) -> &Self::Target {
Expand All @@ -45,7 +45,7 @@ impl<'a, T> Deref for LockReadGuard<'a, T> {

/// Both MutexGuard and RwLockReadGuard are StableDeref, so enum of those two is
/// also StableDeref
unsafe impl<'a, T> stable_deref_trait::StableDeref for LockReadGuard<'a, T> {}
unsafe impl<T> stable_deref_trait::StableDeref for LockReadGuard<'_, T> {}

/// An enum representing a write guard for either a `Mutex` or `RwLock`.
/// This allows for a unified interface for write access to the underlying data.
Expand All @@ -54,7 +54,7 @@ enum LockWriteGuard<'a, T> {
RwLockWrite(RwLockWriteGuard<'a, T>),
}

impl<'a, T> Deref for LockWriteGuard<'a, T> {
impl<T> Deref for LockWriteGuard<'_, T> {
type Target = T;

fn deref(&self) -> &Self::Target {
Expand All @@ -65,7 +65,7 @@ impl<'a, T> Deref for LockWriteGuard<'a, T> {
}
}

impl<'a, T> DerefMut for LockWriteGuard<'a, T> {
impl<T> DerefMut for LockWriteGuard<'_, T> {
fn deref_mut(&mut self) -> &mut Self::Target {
match self {
LockWriteGuard::Mutex(guard) => &mut *guard,
Expand All @@ -76,7 +76,7 @@ impl<'a, T> DerefMut for LockWriteGuard<'a, T> {

/// Both MutexGuard and RwLockWriteGuard are StableDeref, so enum of those two
/// is also StableDeref
unsafe impl<'a, T> stable_deref_trait::StableDeref for LockWriteGuard<'a, T> {}
unsafe impl<T> stable_deref_trait::StableDeref for LockWriteGuard<'_, T> {}

/// A type alias for an `Arc` containing a dynamically typed value that is both
/// `Sync` and `Send`. This is used to store values in the registry.
Expand Down

0 comments on commit 312c459

Please sign in to comment.