Skip to content

Commit

Permalink
Move comment to right function
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromefroe committed Jan 28, 2024
1 parent 646fc5a commit 96968d8
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,20 @@ struct KeyRef<K> {
}

impl<K: Hash> Hash 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 hash<H: Hasher>(&self, state: &mut H) {
unsafe { (*self.k).hash(state) }
}
}

impl<K: PartialEq> PartialEq for KeyRef<K> {
fn eq(&self, other: &KeyRef<K>) -> bool {

Check failure on line 101 in src/lib.rs

View workflow job for this annotation

GitHub Actions / ci (nightly)

function cannot return without recursing
unsafe { (*self.k).eq(&*other.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)]
unsafe {
(*self.k).eq(&*other.k)
}
}
}

Expand Down

0 comments on commit 96968d8

Please sign in to comment.