From 78d837c080df2a526a3743f3a52961f44ba4b4f0 Mon Sep 17 00:00:00 2001 From: nym21 Date: Sat, 26 Jul 2025 01:04:36 +0200 Subject: [PATCH] computer: flush + punch --- crates/brk_computer/src/lib.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/brk_computer/src/lib.rs b/crates/brk_computer/src/lib.rs index 7b342ba32..a12ba3a2f 100644 --- a/crates/brk_computer/src/lib.rs +++ b/crates/brk_computer/src/lib.rs @@ -32,6 +32,7 @@ use states::*; #[derive(Clone)] pub struct Computer { + file: Arc, fetcher: Option, pub vecs: all::Vecs, } @@ -65,6 +66,7 @@ impl Computer { &states_path, )?, fetcher, + file, }) } } @@ -78,6 +80,9 @@ impl Computer { ) -> color_eyre::Result<()> { info!("Computing..."); self.vecs - .compute(indexer, starting_indexes, self.fetcher.as_mut(), exit) + .compute(indexer, starting_indexes, self.fetcher.as_mut(), exit)?; + self.file.flush()?; + self.file.punch_holes()?; + Ok(()) } }