diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2021-11-07 14:43:38 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2023-11-21 16:46:50 -0500 |
commit | 932ff518e5f70c58e8dc687c00dab2bbdd4bec8d (patch) | |
tree | 5c0c6931b161d889ec79f32215cc5ff1a9166402 | |
parent | 9921304be59b13bfa6dca0c8938a3952003556e4 (diff) | |
download | kd-forest-932ff518e5f70c58e8dc687c00dab2bbdd4bec8d.tar.xz |
frontier: Remove unused is_empty() method
-rw-r--r-- | src/frontier.rs | 3 | ||||
-rw-r--r-- | src/frontier/image.rs | 4 | ||||
-rw-r--r-- | src/frontier/mean.rs | 4 | ||||
-rw-r--r-- | src/frontier/min.rs | 4 |
4 files changed, 0 insertions, 15 deletions
diff --git a/src/frontier.rs b/src/frontier.rs index ccc3efa..40b1d35 100644 --- a/src/frontier.rs +++ b/src/frontier.rs @@ -25,9 +25,6 @@ pub trait Frontier { /// The number of pixels currently on the frontier. fn len(&self) -> usize; - /// Whether the frontier is empty. - fn is_empty(&self) -> bool; - /// Place the given color on the frontier, and return its position. fn place(&mut self, rgb8: Rgb8) -> Option<(u32, u32)>; } diff --git a/src/frontier/image.rs b/src/frontier/image.rs index 5db33b8..ded0cbe 100644 --- a/src/frontier/image.rs +++ b/src/frontier/image.rs @@ -58,10 +58,6 @@ where self.len - self.deleted } - fn is_empty(&self) -> bool { - self.len() == 0 - } - fn place(&mut self, rgb8: Rgb8) -> Option<(u32, u32)> { let color = C::from(rgb8); diff --git a/src/frontier/mean.rs b/src/frontier/mean.rs index 25bee7d..30443c9 100644 --- a/src/frontier/mean.rs +++ b/src/frontier/mean.rs @@ -139,10 +139,6 @@ where self.len - self.deleted } - fn is_empty(&self) -> bool { - self.len() == 0 - } - fn place(&mut self, rgb8: Rgb8) -> Option<(u32, u32)> { let color = C::from(rgb8); let (x, y) = self.forest.nearest(&Target(color)).map(|n| n.item.pos)?; diff --git a/src/frontier/min.rs b/src/frontier/min.rs index 8c5099d..da08746 100644 --- a/src/frontier/min.rs +++ b/src/frontier/min.rs @@ -144,10 +144,6 @@ where self.len - self.deleted } - fn is_empty(&self) -> bool { - self.len() == 0 - } - fn place(&mut self, rgb8: Rgb8) -> Option<(u32, u32)> { let color = C::from(rgb8); let (x, y) = self |