Use .write_all

This commit is contained in:
sharkdp 2020-04-03 10:37:53 +02:00
parent 3066445e6b
commit 289d6443a7
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ fn get_test_env_with_abs_path(dirs: &[&'static str], files: &[&'static str]) ->
fn create_file_with_size<P: AsRef<Path>>(path: P, size_in_bytes: usize) {
let content = "#".repeat(size_in_bytes);
let mut f = fs::File::create::<P>(path).unwrap();
f.write(content.as_bytes()).unwrap();
f.write_all(content.as_bytes()).unwrap();
}
/// Simple tests