From 29d3b387dc084290ab10b73619d77c3fdf6c95da Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Thu, 1 Apr 2021 10:45:09 -0400 Subject: [PATCH] cleanup and comment out unused functions --- src/grid.rs | 3 +++ src/model.rs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/grid.rs b/src/grid.rs index 1710ef7..73e74a2 100644 --- a/src/grid.rs +++ b/src/grid.rs @@ -159,6 +159,8 @@ impl Grid { ); } + // No longer needed (moved to imgdata.rs) + /* pub fn quantile(&self, fraction: f32) -> f32 { let index = if (fraction - 1.0_f32).abs() < f32::EPSILON { self.data.len() - 1 @@ -175,6 +177,7 @@ impl Grid { pub fn data(&self) -> &[f32] { &self.data } + */ } pub fn combine(grids: &mut [Grid], attraction_table: &[T]) diff --git a/src/model.rs b/src/model.rs index b9576c0..0401690 100644 --- a/src/model.rs +++ b/src/model.rs @@ -194,7 +194,7 @@ impl Model { pub fn render_all_imgdata(&self) { if !Path::new("./tmp").exists() { - std::fs::create_dir("./tmp"); + std::fs::create_dir("./tmp").expect("could create directory"); } let pb = ProgressBar::new(self.img_data_vec.len() as u64);