diff options
| author | Laurenz <laurmaedje@gmail.com> | 2025-02-24 12:17:31 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2025-02-25 15:28:14 +0100 |
| commit | 20d4f8135abe580f99d5061680ba606d1b68f5e0 (patch) | |
| tree | f51a53ca15faf55a6b620eba4de76976853f3151 /crates | |
| parent | a998775edcb16308fd9f2a71bb20497414c113c4 (diff) | |
Fix comparison of `Func` and `NativeFuncData` (#5943)
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/typst-library/src/foundations/func.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/typst-library/src/foundations/func.rs b/crates/typst-library/src/foundations/func.rs index 3ed1562f..66c6b70a 100644 --- a/crates/typst-library/src/foundations/func.rs +++ b/crates/typst-library/src/foundations/func.rs @@ -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, } } |
