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/introspection | |
| parent | 9473aface183feaf48601c5264c3604f5798169e (diff) | |
Don't generate accessors for required fields (#5680)
Diffstat (limited to 'crates/typst-library/src/introspection')
| -rw-r--r-- | crates/typst-library/src/introspection/counter.rs | 2 | ||||
| -rw-r--r-- | crates/typst-library/src/introspection/state.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/typst-library/src/introspection/counter.rs b/crates/typst-library/src/introspection/counter.rs index e189103d..d26a9f9f 100644 --- a/crates/typst-library/src/introspection/counter.rs +++ b/crates/typst-library/src/introspection/counter.rs @@ -800,7 +800,7 @@ impl ManualPageCounter { let Some(elem) = elem.to_packed::<CounterUpdateElem>() else { continue; }; - if *elem.key() == CounterKey::Page { + if elem.key == CounterKey::Page { let mut state = CounterState(smallvec![self.logical]); state.update(engine, elem.update.clone())?; self.logical = state.first(); diff --git a/crates/typst-library/src/introspection/state.rs b/crates/typst-library/src/introspection/state.rs index 7e019e6c..e6ab926b 100644 --- a/crates/typst-library/src/introspection/state.rs +++ b/crates/typst-library/src/introspection/state.rs @@ -245,7 +245,7 @@ impl State { for elem in introspector.query(&self.selector()) { let elem = elem.to_packed::<StateUpdateElem>().unwrap(); - match elem.update() { + match &elem.update { StateUpdate::Set(value) => state = value.clone(), StateUpdate::Func(func) => { state = func.call(&mut engine, Context::none().track(), [state])? |
