summaryrefslogtreecommitdiff
path: root/benches
diff options
context:
space:
mode:
Diffstat (limited to 'benches')
-rw-r--r--benches/oneshot.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/benches/oneshot.rs b/benches/oneshot.rs
index a42a710d..63f201ac 100644
--- a/benches/oneshot.rs
+++ b/benches/oneshot.rs
@@ -6,7 +6,7 @@ use typst::eval::eval;
use typst::layout::layout;
use typst::loading::MemLoader;
use typst::parse::{parse, Scanner, TokenMode, Tokens};
-use typst::source::{SourceFile, SourceId};
+use typst::source::SourceId;
use typst::Context;
const SRC: &str = include_str!("bench.typ");
@@ -44,13 +44,11 @@ fn bench_scan(iai: &mut Iai) {
}
fn bench_tokenize(iai: &mut Iai) {
- let src = SourceFile::detached(SRC);
- iai.run(|| Tokens::new(black_box(&src), black_box(TokenMode::Markup)).count());
+ iai.run(|| Tokens::new(black_box(&SRC), black_box(TokenMode::Markup)).count());
}
fn bench_parse(iai: &mut Iai) {
- let src = SourceFile::detached(SRC);
- iai.run(|| parse(&src));
+ iai.run(|| parse(&SRC));
}
fn bench_eval(iai: &mut Iai) {