Commit 86d72ba7 authored by Ranadeep Biswas's avatar Ranadeep Biswas
Browse files

using BufWriter

parent 9c3f8871
......@@ -8,7 +8,7 @@ use std::process::{Command, Stdio};
use std::path::PathBuf;
use std::io::BufRead;
use std::io::BufReader;
use std::io::{BufReader, BufWriter};
use std::io::Write;
......@@ -44,12 +44,14 @@ impl CNF {
fn write_to_file(&self, path: &PathBuf) {
let mut file = OpenOptions::new()
.expect("couldn't create");
let mut file = BufWriter::new(
.expect("couldn't create"),
writeln!(file, "p cnf {} {}", self.n_variable, self.clauses.len() - 1)
.expect("failed to write parameters");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment