From 2d32ac73b63c81ea2754916feb7758c042f4ed3d Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 13 May 2024 19:54:34 +0200 Subject: Replace all `Prehashed` with `LazyHash` (#4127) --- docs/src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'docs/src/lib.rs') diff --git a/docs/src/lib.rs b/docs/src/lib.rs index 765e7c7c..66242cbb 100644 --- a/docs/src/lib.rs +++ b/docs/src/lib.rs @@ -9,7 +9,6 @@ pub use self::contribs::*; pub use self::html::*; pub use self::model::*; -use comemo::Prehashed; use ecow::{eco_format, EcoString}; use once_cell::sync::Lazy; use serde::Deserialize; @@ -28,6 +27,7 @@ use typst::model::Document; use typst::model::MODEL; use typst::symbols::SYMBOLS; use typst::text::{Font, FontBook, TEXT}; +use typst::utils::LazyHash; use typst::visualize::VISUALIZE; use typst::Library; @@ -54,7 +54,7 @@ static GROUPS: Lazy> = Lazy::new(|| { groups }); -static LIBRARY: Lazy> = Lazy::new(|| { +static LIBRARY: Lazy> = Lazy::new(|| { let mut lib = Library::default(); lib.styles .set(PageElem::set_width(Smart::Custom(Abs::pt(240.0).into()))); @@ -62,16 +62,16 @@ static LIBRARY: Lazy> = Lazy::new(|| { lib.styles.set(PageElem::set_margin(Margin::splat(Some(Smart::Custom( Abs::pt(15.0).into(), ))))); - Prehashed::new(lib) + LazyHash::new(lib) }); -static FONTS: Lazy<(Prehashed, Vec)> = Lazy::new(|| { +static FONTS: Lazy<(LazyHash, Vec)> = Lazy::new(|| { let fonts: Vec<_> = typst_assets::fonts() .chain(typst_dev_assets::fonts()) .flat_map(|data| Font::iter(Bytes::from_static(data))) .collect(); let book = FontBook::from_fonts(&fonts); - (Prehashed::new(book), fonts) + (LazyHash::new(book), fonts) }); /// Build documentation pages. -- cgit v1.2.3