summaryrefslogtreecommitdiffstats
path: root/src/frontier/image.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontier/image.rs')
-rw-r--r--src/frontier/image.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/frontier/image.rs b/src/frontier/image.rs
index 18bf620..8b4c233 100644
--- a/src/frontier/image.rs
+++ b/src/frontier/image.rs
@@ -19,7 +19,10 @@ pub struct ImageFrontier<C> {
deleted: usize,
}
-impl<C: ColorSpace> ImageFrontier<C> {
+impl<C: ColorSpace> ImageFrontier<C>
+where
+ C::Value: PartialOrd<C::Distance>,
+{
/// Create an ImageFrontier from an image.
pub fn new(img: &RgbImage) -> Self {
let width = img.width();
@@ -39,7 +42,10 @@ impl<C: ColorSpace> ImageFrontier<C> {
}
}
-impl<C: ColorSpace> Frontier for ImageFrontier<C> {
+impl<C: ColorSpace> Frontier for ImageFrontier<C>
+where
+ C::Value: PartialOrd<C::Distance>,
+{
fn width(&self) -> u32 {
self.width
}