Fix comparison of Func and NativeFuncData (#5943)

This commit is contained in:
Laurenz 2025-02-24 12:17:31 +01:00 committed by GitHub
parent 56f4fa2b4d
commit ebe2543264
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -437,10 +437,10 @@ impl PartialEq for Func {
} }
} }
impl PartialEq<&NativeFuncData> for Func { impl PartialEq<&'static NativeFuncData> for Func {
fn eq(&self, other: &&NativeFuncData) -> bool { fn eq(&self, other: &&'static NativeFuncData) -> bool {
match &self.repr { match &self.repr {
Repr::Native(native) => native.function == other.function, Repr::Native(native) => *native == Static(*other),
_ => false, _ => false,
} }
} }