Skip to content
This repository was archived by the owner on Jan 29, 2025. It is now read-only.

Commit b84338e

Browse files
committed
Address Jim's notes
1 parent 20b93e4 commit b84338e

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.github/workflows/pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
# we could use `test` but `criterion` is a dev dependency,
3030
# and it doesn't build with our MSRV
3131
command: check
32-
# `cli` already enables most features, so let's add the rest,
32+
# `cli` already enables most features,
3333
# except for `arbitrary`, which requires Rust-1.51
3434
args: --workspace
3535
- name: Check snapshots

benches/criterion.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,15 @@ fn frontends(c: &mut Criterion) {
5959
});
6060
#[cfg(feature = "wgsl-in")]
6161
group.bench_function("wgsl", |b| {
62-
let inputs = gather_inputs("tests/in", "wgsl");
62+
let inputs_wgsl = gather_inputs("tests/in", "wgsl");
63+
let inputs = inputs_wgsl
64+
.iter()
65+
.map(|input| std::str::from_utf8(input).unwrap())
66+
.collect::<Vec<_>>();
6367
let mut parser = naga::front::wgsl::Parser::new();
6468
b.iter(move || {
65-
for input in inputs.iter() {
66-
let string = std::str::from_utf8(input).unwrap();
67-
parser.parse(string).unwrap();
69+
for &input in inputs.iter() {
70+
parser.parse(input).unwrap();
6871
}
6972
});
7073
});

0 commit comments

Comments
 (0)