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 /tests/fuzz | |
| parent | 95cd6adf24cb14ede8896fbb0c610432960f4f3a (diff) | |
Replace all `Prehashed` with `LazyHash` (#4127)
Diffstat (limited to 'tests/fuzz')
| -rw-r--r-- | tests/fuzz/src/compile.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/fuzz/src/compile.rs b/tests/fuzz/src/compile.rs index 2d445bf5..4dbea410 100644 --- a/tests/fuzz/src/compile.rs +++ b/tests/fuzz/src/compile.rs @@ -1,18 +1,18 @@ #![no_main] -use comemo::Prehashed; use libfuzzer_sys::fuzz_target; use typst::diag::{FileError, FileResult}; use typst::eval::Tracer; use typst::foundations::{Bytes, Datetime}; use typst::syntax::{FileId, Source}; use typst::text::{Font, FontBook}; +use typst::utils::LazyHash; use typst::visualize::Color; use typst::{Library, World}; struct FuzzWorld { - library: Prehashed<Library>, - book: Prehashed<FontBook>, + library: LazyHash<Library>, + book: LazyHash<FontBook>, font: Font, source: Source, } @@ -23,8 +23,8 @@ impl FuzzWorld { let font = Font::new(Bytes::from_static(data), 0).unwrap(); let book = FontBook::from_fonts([&font]); Self { - library: Prehashed::new(Library::default()), - book: Prehashed::new(book), + library: LazyHash::new(Library::default()), + book: LazyHash::new(book), font, source: Source::detached(text), } @@ -32,11 +32,11 @@ impl FuzzWorld { } impl World for FuzzWorld { - fn library(&self) -> &Prehashed<Library> { + fn library(&self) -> &LazyHash<Library> { &self.library } - fn book(&self) -> &Prehashed<FontBook> { + fn book(&self) -> &LazyHash<FontBook> { &self.book } |
