summary refs log tree commit diff
path: root/src/librustc_data_structures
diff options
context:
space:
mode:
authorShotaro Yamada <sinkuu@sinkuu.xyz>2020-01-23 00:22:46 +0900
committerShotaro Yamada <sinkuu@sinkuu.xyz>2020-02-01 19:26:45 +0900
commit482c761704b9f7d08d00b6cf4c567db427da7ec7 (patch)
tree9e2a71b3c8987033aff1a2a0af367d28ed312d52 /src/librustc_data_structures
parentcdd41ea5fc37d1ba879fd52743bde35fde4a89df (diff)
downloadrust-482c761704b9f7d08d00b6cf4c567db427da7ec7.tar.gz
rust-482c761704b9f7d08d00b6cf4c567db427da7ec7.zip
Use BufWriter
Diffstat (limited to 'src/librustc_data_structures')
-rw-r--r--src/librustc_data_structures/obligation_forest/graphviz.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustc_data_structures/obligation_forest/graphviz.rs b/src/librustc_data_structures/obligation_forest/graphviz.rs
index ddf89d99621..0fd83dad56b 100644
--- a/src/librustc_data_structures/obligation_forest/graphviz.rs
+++ b/src/librustc_data_structures/obligation_forest/graphviz.rs
@@ -2,6 +2,7 @@ use crate::obligation_forest::{ForestObligation, ObligationForest};
 use graphviz as dot;
 use std::env::var_os;
 use std::fs::File;
+use std::io::BufWriter;
 use std::path::Path;
 use std::sync::atomic::AtomicUsize;
 use std::sync::atomic::Ordering;
@@ -31,7 +32,7 @@ impl<O: ForestObligation> ObligationForest<O> {
 
         let file_path = dir.as_ref().join(format!("{:010}_{}.gv", counter, description));
 
-        let mut gv_file = File::create(file_path).unwrap();
+        let mut gv_file = BufWriter::new(File::create(file_path).unwrap());
 
         dot::render(&self, &mut gv_file).unwrap();
     }