From 96968d801a7d205958ee3a25a225498d5e795ca5 Mon Sep 17 00:00:00 2001 From: Jerome Froelich Date: Sun, 28 Jan 2024 14:12:31 -0600 Subject: [PATCH] Move comment to right function --- src/lib.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 97277ca..14f895d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -92,10 +92,6 @@ struct KeyRef { } impl Hash for KeyRef { - // 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(&self, state: &mut H) { unsafe { (*self.k).hash(state) } } @@ -103,7 +99,13 @@ impl Hash for KeyRef { impl PartialEq for KeyRef { fn eq(&self, other: &KeyRef) -> bool { - 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) + } } }