Fix performance regression

This commit is contained in:
Laurenz 2021-01-03 00:41:12 +01:00
parent aae67bd572
commit 32af3095f8

View File

@ -12,7 +12,7 @@ use crate::paper::{Paper, PaperClass, PAPER_A4};
#[derive(Debug, Clone, PartialEq)] #[derive(Debug, Clone, PartialEq)]
pub struct State { pub struct State {
/// The scope that contains variable definitions. /// The scope that contains variable definitions.
pub scope: Scope, pub scope: Rc<Scope>,
/// The current page state. /// The current page state.
pub page: StatePage, pub page: StatePage,
/// The current paragraph state. /// The current paragraph state.
@ -28,7 +28,7 @@ pub struct State {
impl Default for State { impl Default for State {
fn default() -> Self { fn default() -> Self {
Self { Self {
scope: crate::library::_std(), scope: Rc::new(crate::library::_std()),
page: StatePage::default(), page: StatePage::default(),
par: StatePar::default(), par: StatePar::default(),
font: StateFont::default(), font: StateFont::default(),