mirror of
https://github.com/typst/typst
synced 2025-05-13 20:46:23 +08:00
Fix comparison of Func
and NativeFuncData
(#5943)
This commit is contained in:
parent
56f4fa2b4d
commit
ebe2543264
@ -437,10 +437,10 @@ impl PartialEq for Func {
|
||||
}
|
||||
}
|
||||
|
||||
impl PartialEq<&NativeFuncData> for Func {
|
||||
fn eq(&self, other: &&NativeFuncData) -> bool {
|
||||
impl PartialEq<&'static NativeFuncData> for Func {
|
||||
fn eq(&self, other: &&'static NativeFuncData) -> bool {
|
||||
match &self.repr {
|
||||
Repr::Native(native) => native.function == other.function,
|
||||
Repr::Native(native) => *native == Static(*other),
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user