mirror of https://github.com/stelzo/typst.git
Fix comparison of `Func` and `NativeFuncData` (#5943)
This commit is contained in:
parent
a998775edc
commit
20d4f8135a
|
|
@ -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…
Reference in New Issue