diff --git a/src/lib8.rs b/src/lib8.rs index 5b2bb3f..6ee343d 100644 --- a/src/lib8.rs +++ b/src/lib8.rs @@ -3,11 +3,11 @@ use palette::encoding::srgb::Srgb; use rgb::RGB8; pub trait Rgb8Blend { - fn saturating_add(&self, b: Self) -> Self; + fn saturating_add(self, b: Self) -> Self; } impl Rgb8Blend for RGB8 { - fn saturating_add(&self, b: Self) -> Self { + fn saturating_add(self, b: Self) -> Self { RGB8::new(self.r.saturating_add(b.r), self.g.saturating_add(b.g), self.b.saturating_add(b.b)) } }