fix: just write to the dang file :P
This commit is contained in:
parent
049aa6f2b1
commit
f5445636a0
1 changed files with 2 additions and 6 deletions
|
@ -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)]
|
||||
|
|
Loading…
Reference in a new issue