Model: rely on draining image data
This commit is contained in:
parent
b62745adec
commit
5d574c9674
@ -34,6 +34,5 @@ fn main() {
|
||||
// export saved image data
|
||||
println!("Rendering all saved image data....");
|
||||
model.render_all_imgdata();
|
||||
model.flush_image_data();
|
||||
println!("Done!");
|
||||
}
|
||||
|
||||
@ -159,14 +159,9 @@ impl Model {
|
||||
self.img_data_vec.len()
|
||||
);
|
||||
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) {
|
||||
if !Path::new("./tmp").exists() {
|
||||
std::fs::create_dir("./tmp").expect("could create directory");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user