mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +08:00
Fix performance regression ⚡
This commit is contained in:
parent
aae67bd572
commit
32af3095f8
@ -12,7 +12,7 @@ use crate::paper::{Paper, PaperClass, PAPER_A4};
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct State {
|
||||
/// The scope that contains variable definitions.
|
||||
pub scope: Scope,
|
||||
pub scope: Rc<Scope>,
|
||||
/// The current page state.
|
||||
pub page: StatePage,
|
||||
/// The current paragraph state.
|
||||
@ -28,7 +28,7 @@ pub struct State {
|
||||
impl Default for State {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
scope: crate::library::_std(),
|
||||
scope: Rc::new(crate::library::_std()),
|
||||
page: StatePage::default(),
|
||||
par: StatePar::default(),
|
||||
font: StateFont::default(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user