diff options
| author | Laurenz <laurmaedje@gmail.com> | 2025-01-10 17:54:11 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-10 16:54:11 +0000 |
| commit | 6b9b78596a6103dfbcadafaeb03eda624da5306a (patch) | |
| tree | 073a9e31f504634290337c20432ea13dc7a8953d /crates/typst-library/src/math | |
| parent | 9473aface183feaf48601c5264c3604f5798169e (diff) | |
Don't generate accessors for required fields (#5680)
Diffstat (limited to 'crates/typst-library/src/math')
| -rw-r--r-- | crates/typst-library/src/math/accent.rs | 2 | ||||
| -rw-r--r-- | crates/typst-library/src/math/attach.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/typst-library/src/math/accent.rs b/crates/typst-library/src/math/accent.rs index fee705ee..b87e527f 100644 --- a/crates/typst-library/src/math/accent.rs +++ b/crates/typst-library/src/math/accent.rs @@ -143,7 +143,7 @@ cast! { self => self.0.into_value(), v: char => Self::new(v), v: Content => match v.to_packed::<TextElem>() { - Some(elem) => Value::Str(elem.text().clone().into()).cast()?, + Some(elem) => Value::Str(elem.text.clone().into()).cast()?, None => bail!("expected text"), }, } diff --git a/crates/typst-library/src/math/attach.rs b/crates/typst-library/src/math/attach.rs index e1f57727..d526aba5 100644 --- a/crates/typst-library/src/math/attach.rs +++ b/crates/typst-library/src/math/attach.rs @@ -47,9 +47,9 @@ impl Packed<AttachElem> { /// base AttachElem where possible. pub fn merge_base(&self) -> Option<Self> { // Extract from an EquationElem. - let mut base = self.base(); + let mut base = &self.base; while let Some(equation) = base.to_packed::<EquationElem>() { - base = equation.body(); + base = &equation.body; } // Move attachments from elem into base where possible. |
