mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
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:
parent
d651ce51cc
commit
0316cd2a3a
1 changed files with 4 additions and 4 deletions
|
|
@ -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"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue