diff options
Diffstat (limited to 'tests/src/benches.rs')
| -rw-r--r-- | tests/src/benches.rs | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/tests/src/benches.rs b/tests/src/benches.rs index aeddcaf9..9ee7a2f3 100644 --- a/tests/src/benches.rs +++ b/tests/src/benches.rs @@ -1,13 +1,12 @@ -use std::path::Path; - use comemo::{Prehashed, Track, Tracked}; use iai::{black_box, main, Iai}; -use typst::diag::{FileError, FileResult}; +use typst::diag::FileResult; use typst::eval::{Datetime, Library}; +use typst::file::FileId; use typst::font::{Font, FontBook}; use typst::geom::Color; -use typst::syntax::{Source, SourceId}; -use typst::util::Buffer; +use typst::syntax::Source; +use typst::util::Bytes; use typst::World; use unscanny::Scanner; @@ -124,31 +123,27 @@ impl World for BenchWorld { &self.library } - fn main(&self) -> &Source { - &self.source + fn book(&self) -> &Prehashed<FontBook> { + &self.book } - fn resolve(&self, path: &Path) -> FileResult<SourceId> { - Err(FileError::NotFound(path.into())) + fn main(&self) -> Source { + self.source.clone() } - fn source(&self, _: SourceId) -> &Source { - &self.source + fn source(&self, _: FileId) -> FileResult<Source> { + unimplemented!() } - fn book(&self) -> &Prehashed<FontBook> { - &self.book + fn file(&self, _: FileId) -> FileResult<Bytes> { + unimplemented!() } fn font(&self, _: usize) -> Option<Font> { Some(self.font.clone()) } - fn file(&self, path: &Path) -> FileResult<Buffer> { - Err(FileError::NotFound(path.into())) - } - fn today(&self, _: Option<i64>) -> Option<Datetime> { - Some(Datetime::from_ymd(1970, 1, 1).unwrap()) + unimplemented!() } } |
