From f5445636a0832a0a8823c4760007856c282d0ee0 Mon Sep 17 00:00:00 2001 From: mehbark <terezi@pyrope.net> Date: Thu, 27 Mar 2025 02:41:12 -0400 Subject: [PATCH] fix: just write to the dang file :P --- src/main.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index 1f0b1bf..8d5b8b8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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)]