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:
Alexander Theißen
2020-10-08 15:38:11 +02:00
parent 016425a25b
commit 2306999c9c
+1 -1
View File
@@ -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();