Skip to content

Commit b720847

Browse files
committed
wrap output in BufWriter
1 parent 6379e5e commit b720847

File tree

1 file changed

+3
-2
lines changed
  • compiler/rustc_monomorphize/src/partitioning

1 file changed

+3
-2
lines changed

compiler/rustc_monomorphize/src/partitioning/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ mod merging;
9797

9898
use std::cmp;
9999
use std::fs::{self, File};
100-
use std::io::Write;
100+
use std::io::{BufWriter, Write};
101101
use std::path::{Path, PathBuf};
102102

103103
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
@@ -497,7 +497,8 @@ fn dump_mono_items_stats<'tcx>(
497497

498498
let filename = format!("{}.mono_items.md", crate_name.unwrap_or("unknown-crate"));
499499
let output_path = output_directory.join(&filename);
500-
let mut file = File::create(output_path)?;
500+
let file = File::create(output_path)?;
501+
let mut file = BufWriter::new(file);
501502

502503
// Gather instantiated mono items grouped by def_id
503504
let mut items_per_def_id: FxHashMap<_, Vec<_>> = Default::default();

0 commit comments

Comments
 (0)