Skip to content

Commit 409b4c1

Browse files
committed
ColorEvent -> RGB8: use From instead of Into
this fixes a clippy lint warning which i missed because this is hiding behind a feature flag and thus it only showed up in the CI build now that i'm actually building the features there.
1 parent 5a9d4da commit 409b4c1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/color_event.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ impl ColorEvent {
5151
}
5252

5353
#[cfg(feature = "rgb")]
54-
impl Into<RGB8> for ColorEvent {
55-
fn into(self) -> RGB8 {
54+
impl From<ColorEvent> for RGB8 {
55+
fn from(val: ColorEvent) -> Self {
5656
RGB8 {
57-
r: self.red,
58-
g: self.green,
59-
b: self.blue,
57+
r: val.red,
58+
g: val.green,
59+
b: val.blue,
6060
}
6161
}
6262
}

0 commit comments

Comments
 (0)