services/content-plugin-api: Implement From instead of Into

Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
This commit is contained in:
Jean-Pierre De Jesus DIAZ 2022-10-12 15:30:50 +02:00
parent d651ce51cc
commit 0316cd2a3a
No known key found for this signature in database
GPG key ID: 6279AEC20A9524EC

View file

@ -21,9 +21,9 @@ impl core::convert::TryFrom<&Message> for Opcode {
}
}
impl Into<Message> for Opcode {
fn into(self) -> Message {
match self {
impl From<Opcode> for Message {
fn from(opcode: Opcode) -> Message {
match opcode {
Opcode::Redraw => Message::Scalar(ScalarMessage {
id: 0,
arg1: 0,
@ -31,7 +31,7 @@ impl Into<Message> for Opcode {
arg3: 0,
arg4: 0,
}),
// _ => panic!("SHCH api: Opcode type not handled by Into(), refer to helper method"),
// _ => panic!("SHCH api: Opcode type not handled by From<Opcode>, refer to helper method"),
}
}
}