mirror of
https://github.com/pezkuwichain/wasm-instrument.git
synced 2026-06-13 14:01:11 +00:00
Fix using Write::write without checking the return value
Use write_all instead which garantues that the whole buffer was written.
This commit is contained in:
+1
-1
@@ -230,7 +230,7 @@ mod tests {
|
||||
|
||||
let wasm_path = target_path.join("example_wasm.wasm");
|
||||
let mut f = fs::File::create(wasm_path).expect("create fail failed");
|
||||
f.write(b"\0asm").expect("write file failed");
|
||||
f.write_all(b"\0asm").expect("write file failed");
|
||||
}
|
||||
|
||||
let path = tmp_dir.path().to_string_lossy();
|
||||
|
||||
Reference in New Issue
Block a user