From 4ab1b0fe3d8e1e9e2264de8fb254d2eb9c33723b Mon Sep 17 00:00:00 2001 From: Leedehai <18319900+Leedehai@users.noreply.github.com> Date: Sat, 9 Mar 2024 03:45:54 -0500 Subject: [PATCH] Consolidate what internal methods Counter's user-visible methods call (#3561) --- crates/typst/src/introspection/counter.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/typst/src/introspection/counter.rs b/crates/typst/src/introspection/counter.rs index 3bf553a51..c3ed2bc7c 100644 --- a/crates/typst/src/introspection/counter.rs +++ b/crates/typst/src/introspection/counter.rs @@ -213,7 +213,7 @@ impl Counter { /// The counter for the given element. pub fn of(func: Element) -> Self { - Self::construct(CounterKey::Selector(Selector::Elem(func, None))) + Self::new(CounterKey::Selector(Selector::Elem(func, None))) } /// Gets the current and final value of the state combined in one state. @@ -405,14 +405,14 @@ impl Counter { /// /// - If it is a string, creates a custom counter that is only affected /// by manual updates, - /// - If this is a `{