mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-22 07:21:04 +01:00
Fixed compile-time error in spv fuzzer test. (#967)
* Fixed compile-time error in spv fuzzer test.
error[E0061]: this function takes 2 arguments but 1 argument was supplied
--> fuzz_targets/spv_parser.rs:7:19
|
7 | let _result = Parser::new(data.into_iter()).parse();
| ^^^^^^^^^^^ ---------------- supplied 1 argument
| |
| expected 2 arguments
|
note: associated function defined here
--> /Users/evgeny.proydakov/repository/naga/src/front/spv/mod.rs:411:12
|
411 | pub fn new(data: I, options: &Options) -> Self {
| ^^^
error: aborting due to previous error
* Code review. Group imports
This commit is contained in:
1 parent
4224d14a08
commit
753e9608d3
1 file changed
+3
-2
@@ -1,8 +1,9 @@
|
||||
#![no_main]
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use naga::front::spv::Parser;
|
||||
use naga::front::spv::{Parser, Options};
|
||||
|
||||
fuzz_target!(|data: Vec<u32>| {
|
||||
// Ensure the parser can handle potentially malformed data without crashing.
|
||||
let _result = Parser::new(data.into_iter()).parse();
|
||||
let options = Options::default();
|
||||
let _result = Parser::new(data.into_iter(), &options).parse();
|
||||
});
|
||||
Reference in new issue
Block a user