mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +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 {
|
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,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user