This repository was archived by the owner on Jan 29, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 29
29
# we could use `test` but `criterion` is a dev dependency,
30
30
# and it doesn't build with our MSRV
31
31
command : check
32
- # `cli` already enables most features, so let's add the rest,
32
+ # `cli` already enables most features,
33
33
# except for `arbitrary`, which requires Rust-1.51
34
34
args : --workspace
35
35
- name : Check snapshots
Original file line number Diff line number Diff line change @@ -59,12 +59,15 @@ fn frontends(c: &mut Criterion) {
59
59
} ) ;
60
60
#[ cfg( feature = "wgsl-in" ) ]
61
61
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 < _ > > ( ) ;
63
67
let mut parser = naga:: front:: wgsl:: Parser :: new ( ) ;
64
68
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 ( ) ;
68
71
}
69
72
} ) ;
70
73
} ) ;
You can’t perform that action at this time.
0 commit comments