diff options
| author | Laurenz <laurmaedje@gmail.com> | 2025-02-24 12:17:31 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-24 11:17:31 +0000 |
| commit | ebe25432641a729780578a2440eaf9fb07c80e38 (patch) | |
| tree | f01d961eb59e49ddbcf8fc86c4826db9b5cc69ea | |
| parent | 56f4fa2b4d4d772c5b19c9842419dcc4e078744b (diff) | |
Fix comparison of `Func` and `NativeFuncData` (#5943)
| -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, } } |
