Skip to content

Commit 9848c66

Browse files
Fix warnings
1 parent 82d7cd4 commit 9848c66

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

build_system/src/fuzz/reduce.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ fn remove_dup_assign(
3939
ends: usize,
4040
cache: &mut ResultCache,
4141
) {
42-
let mut curr = 0;
4342
let mut file_copy = file.clone();
4443
let mut reduction_count = 0;
4544
// Not worth it.
@@ -427,7 +426,6 @@ pub(super) fn reduce(path: impl AsRef<Path>) {
427426
println!("running `linearize_cf` on {path:?}.");
428427
linearize_cf(&mut file, &path, &mut cache);
429428
let mut out = std::fs::File::create(&path).expect("Could not save the reduction result.");
430-
for line in file {
431-
out.write_all(line.as_bytes());
432-
}
429+
let file = file.into_iter().collect::<String>();
430+
out.write_all(file.as_bytes()).expect("failed to write into file");
433431
}

0 commit comments

Comments
 (0)