Skip to content

Commit

Permalink
Merge pull request #193 from jeromefroe/jerome/ignore-unconditional-r…
Browse files Browse the repository at this point in the history
…ecursion-lints

Ignore unconditional recursion lints
  • Loading branch information
jeromefroe authored Jan 28, 2024
2 parents d7e15ab + 26218d5 commit 1465a37
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ impl<K: Hash> Hash for KeyRef<K> {
}

impl<K: PartialEq> PartialEq for KeyRef<K> {
// NB: The unconditional_recursion lint was added in 1.76.0 and can be removed
// once the current stable version of Rust is 1.76.0 or higher.
#![allow(unknown_lints)]
#[allow(clippy::unconditional_recursion)]
fn eq(&self, other: &KeyRef<K>) -> bool {
unsafe { (*self.k).eq(&*other.k) }
}
Expand All @@ -124,6 +128,10 @@ impl<K: ?Sized + Hash> Hash for KeyWrapper<K> {
}

impl<K: ?Sized + PartialEq> PartialEq for KeyWrapper<K> {
// NB: The unconditional_recursion lint was added in 1.76.0 and can be removed
// once the current stable version of Rust is 1.76.0 or higher.
#![allow(unknown_lints)]
#[allow(clippy::unconditional_recursion)]
fn eq(&self, other: &Self) -> bool {
self.0.eq(&other.0)
}
Expand Down

0 comments on commit 1465a37

Please sign in to comment.