diff options
| author | Laurenz <laurmaedje@gmail.com> | 2024-05-13 19:54:34 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-13 17:54:34 +0000 |
| commit | 2d32ac73b63c81ea2754916feb7758c042f4ed3d (patch) | |
| tree | c9770897cbb1134187132d6835702a1869a74a0a /crates/typst-ide | |
| parent | 95cd6adf24cb14ede8896fbb0c610432960f4f3a (diff) | |
Replace all `Prehashed` with `LazyHash` (#4127)
Diffstat (limited to 'crates/typst-ide')
| -rw-r--r-- | crates/typst-ide/src/lib.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/crates/typst-ide/src/lib.rs b/crates/typst-ide/src/lib.rs index 3967aaad..117e75ab 100644 --- a/crates/typst-ide/src/lib.rs +++ b/crates/typst-ide/src/lib.rs @@ -93,12 +93,12 @@ fn summarize_font_family<'a>(variants: impl Iterator<Item = &'a FontInfo>) -> Ec #[cfg(test)] mod tests { - use comemo::Prehashed; use once_cell::sync::Lazy; use typst::diag::{FileError, FileResult}; use typst::foundations::{Bytes, Datetime}; use typst::syntax::{FileId, Source}; use typst::text::{Font, FontBook}; + use typst::utils::LazyHash; use typst::{Library, World}; /// A world for IDE testing. @@ -120,11 +120,11 @@ mod tests { } impl World for TestWorld { - fn library(&self) -> &Prehashed<Library> { + fn library(&self) -> &LazyHash<Library> { &self.base.library } - fn book(&self) -> &Prehashed<FontBook> { + fn book(&self) -> &LazyHash<FontBook> { &self.base.book } @@ -155,8 +155,8 @@ mod tests { /// Shared foundation of all test worlds. struct TestBase { - library: Prehashed<Library>, - book: Prehashed<FontBook>, + library: LazyHash<Library>, + book: LazyHash<FontBook>, fonts: Vec<Font>, } @@ -168,8 +168,8 @@ mod tests { .collect(); Self { - library: Prehashed::new(Library::default()), - book: Prehashed::new(FontBook::from_fonts(&fonts)), + library: LazyHash::new(Library::default()), + book: LazyHash::new(FontBook::from_fonts(&fonts)), fonts, } } |
