Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore unconditional recursion lints #193

Merged
merged 1 commit into from
Jan 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading