fix: just write to the dang file :P

This commit is contained in:
mehbark 2025-03-27 02:41:12 -04:00
parent 049aa6f2b1
commit f5445636a0

View file

@ -1,5 +1,3 @@
// https://www.smogon.com/stats/2025-02/chaos/
use std::{
collections::HashMap,
fs::{self, File},
@ -45,13 +43,11 @@ fn run(
);
log::info!("opening connection");
let mut conn = Connection::open_in_memory()?;
let mut conn = Connection::open(output_file)?;
create_tables(&mut conn)?;
insert_stats(&mut conn, &stats)?;
conn.execute("VACUUM INTO ?1", (output_file,))?;
Ok(())
}
@ -62,7 +58,7 @@ struct Config {
input_file: PathBuf,
// TODO: non-utf-8 (the problem is saving the database)
#[arg(short, long = "output")]
output_file: String,
output_file: PathBuf,
}
#[derive(Error, Debug)]