From 4000e1d0e7d545b2291411bfbd303e4542b65d9e Mon Sep 17 00:00:00 2001 From: Victoria Fischer Date: Fri, 29 Nov 2024 18:59:31 +0100 Subject: [PATCH] lib8: Rgb8Blend is no longer used --- src/lib8/mod.rs | 11 ----------- src/render.rs | 5 ++--- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/lib8/mod.rs b/src/lib8/mod.rs index a509383..81a7a28 100644 --- a/src/lib8/mod.rs +++ b/src/lib8/mod.rs @@ -8,17 +8,6 @@ use rgb::Rgb; use crate::lib8::interpolate::scale8; -pub trait Rgb8Blend { - fn saturating_add>(self, b: T) -> Self where Self: Sized; -} - -impl Rgb8Blend for Rgb { - fn saturating_add>(self, b: T) -> Self where Self: Sized { - let rgb = b.into(); - Rgb::new(self.r.saturating_add(rgb.r), self.g.saturating_add(rgb.g), self.b.saturating_add(rgb.b)) - } -} - pub trait IntoRgb8 { fn into_rgb8(self) -> Rgb; } diff --git a/src/render.rs b/src/render.rs index 925459f..633248f 100644 --- a/src/render.rs +++ b/src/render.rs @@ -2,7 +2,6 @@ use std::io; use rgb::Rgb; use crate::geometry::*; -use crate::lib8::Rgb8Blend; use crate::lib8::interpolate::Fract8Ops; use crate::power::AsMilliwatts; use crate::task::Task; @@ -10,8 +9,8 @@ use crate::time::Periodically; use running_average::RealTimeRunningAverage; use std::fmt::Debug; -pub trait HardwarePixel: Send + Sync + Rgb8Blend + Copy + AsMilliwatts + Default + From> + Fract8Ops {} -impl HardwarePixel for T where T: Send + Sync + Rgb8Blend + Copy + AsMilliwatts + Default + From> + Fract8Ops {} +pub trait HardwarePixel: Send + Sync + Copy + AsMilliwatts + Default + From> + Fract8Ops {} +impl HardwarePixel for T where T: Send + Sync + Copy + AsMilliwatts + Default + From> + Fract8Ops {} pub trait PixelView { type Pixel: HardwarePixel;