Model: rely on draining image data

This commit is contained in:
Simon Gardling 2025-03-24 17:01:09 -04:00
parent b62745adec
commit 5d574c9674
Signed by: titaniumtown
GPG Key ID: 9AB28AC10ECE533D
2 changed files with 0 additions and 6 deletions

View File

@ -34,6 +34,5 @@ fn main() {
// export saved image data // export saved image data
println!("Rendering all saved image data...."); println!("Rendering all saved image data....");
model.render_all_imgdata(); model.render_all_imgdata();
model.flush_image_data();
println!("Done!"); println!("Done!");
} }

View File

@ -159,14 +159,9 @@ impl Model {
self.img_data_vec.len() self.img_data_vec.len()
); );
self.render_all_imgdata(); self.render_all_imgdata();
self.flush_image_data();
} }
} }
pub fn flush_image_data(&mut self) {
self.img_data_vec.clear();
}
pub fn render_all_imgdata(&mut self) { pub fn render_all_imgdata(&mut self) {
if !Path::new("./tmp").exists() { if !Path::new("./tmp").exists() {
std::fs::create_dir("./tmp").expect("could create directory"); std::fs::create_dir("./tmp").expect("could create directory");