Skip to content

Commit

Permalink
Merge branch 'main' into feat/circuit-mut
Browse files Browse the repository at this point in the history
  • Loading branch information
lmondada authored Sep 29, 2023
2 parents b6e9518 + b470039 commit ead00c4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions taso-optimiser/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ mod tracing;

use crate::tracing::Tracer;

use std::fs::File;
use std::io::BufWriter;
use std::num::NonZeroUsize;
use std::path::Path;
use std::path::PathBuf;
use std::process::exit;
use std::{fs, path::Path};

use clap::Parser;
use hugr::Hugr;
Expand Down Expand Up @@ -82,7 +83,7 @@ struct CmdLineArgs {
}

fn save_tk1_json_file(path: impl AsRef<Path>, circ: &Hugr) -> Result<(), std::io::Error> {
let file = fs::File::create(path)?;
let file = File::create(path)?;
let writer = BufWriter::new(file);
let serial_circ = SerialCircuit::encode(circ).unwrap();
serde_json::to_writer_pretty(writer, &serial_circ)?;
Expand All @@ -102,7 +103,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let ecc_path = Path::new(&opts.eccs);

// TODO: Remove this from the Logger, and use tracing events instead.
let circ_candidates_csv = fs::File::create("best_circs.csv")?;
let circ_candidates_csv = BufWriter::new(File::create("best_circs.csv")?);

let taso_logger = TasoLogger::new(circ_candidates_csv);

Expand Down

0 comments on commit ead00c4

Please sign in to comment.