mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +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 {
|
impl From<Opcode> for Message {
|
||||||
fn into(self) -> Message {
|
fn from(opcode: Opcode) -> Message {
|
||||||
match self {
|
match opcode {
|
||||||
Opcode::Redraw => Message::Scalar(ScalarMessage {
|
Opcode::Redraw => Message::Scalar(ScalarMessage {
|
||||||
id: 0,
|
id: 0,
|
||||||
arg1: 0,
|
arg1: 0,
|
||||||
|
|
@ -31,7 +31,7 @@ impl Into<Message> for Opcode {
|
||||||
arg3: 0,
|
arg3: 0,
|
||||||
arg4: 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