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.rs | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'src/frontier.rs') diff --git a/src/frontier.rs b/src/frontier.rs index 74c7398..ccc3efa 100644 --- a/src/frontier.rs +++ b/src/frontier.rs @@ -4,10 +4,10 @@ pub mod image; pub mod mean; pub mod min; -use crate::color::{ColorSpace, Rgb8}; +use crate::color::Rgb8; use crate::soft::SoftDelete; -use acap::coords::{Coordinates, CoordinateMetric, CoordinateProximity}; +use acap::coords::Coordinates; use acap::distance::{Proximity, Metric}; use std::cell::Cell; @@ -40,7 +40,7 @@ struct Pixel { deleted: Cell, } -impl Pixel { +impl Pixel { fn new(x: u32, y: u32, color: C) -> Self { Self { pos: (x, y), @@ -58,7 +58,7 @@ impl Pixel { #[derive(Clone, Debug)] struct RcPixel(Rc>); -impl RcPixel { +impl RcPixel { fn new(x: u32, y: u32, color: C) -> Self { Self(Rc::new(Pixel::new(x, y, color))) } @@ -136,16 +136,6 @@ impl Coordinates for Target { } } -impl> CoordinateProximity for Target { - type Distance = C::Distance; - - fn distance_to_coords(&self, coords: &[T]) -> Self::Distance { - self.0.distance_to_coords(coords) - } -} - -impl> CoordinateMetric for Target {} - impl Proximity for RcPixel { type Distance = C::Distance; -- cgit v1.2.3