From 6ba084db4ba375eacaa1677fd75de318c12170c7 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 6 Jul 2020 23:04:10 -0400 Subject: Bump acap to 0.2.0 This requires adapting to the new k-d trees, which are significantly faster. --- src/frontier/min.rs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/frontier/min.rs') diff --git a/src/frontier/min.rs b/src/frontier/min.rs index 95b3321..5c298e7 100644 --- a/src/frontier/min.rs +++ b/src/frontier/min.rs @@ -16,7 +16,10 @@ struct MinPixel { filled: bool, } -impl MinPixel { +impl MinPixel +where + C::Value: PartialOrd, +{ fn new() -> Self { Self { pixel: None, @@ -39,7 +42,10 @@ pub struct MinFrontier { deleted: usize, } -impl MinFrontier { +impl MinFrontier +where + C::Value: PartialOrd, +{ /// Create a MinFrontier with the given dimensions and initial pixel location. pub fn new(rng: R, width: u32, height: u32, x0: u32, y0: u32) -> Self { let size = (width as usize) * (height as usize); @@ -122,7 +128,10 @@ impl MinFrontier { } } -impl Frontier for MinFrontier { +impl Frontier for MinFrontier +where + C::Value: PartialOrd, +{ fn width(&self) -> u32 { self.width } -- cgit v1.2.3