mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04: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,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