From 0316cd2a3af15e408bf1975b0d4bcf3c85759396 Mon Sep 17 00:00:00 2001 From: Jean-Pierre De Jesus DIAZ Date: Wed, 12 Oct 2022 15:30:50 +0200 Subject: [PATCH] services/content-plugin-api: Implement From instead of Into Signed-off-by: Jean-Pierre De Jesus DIAZ --- services/content-plugin-api/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/services/content-plugin-api/src/lib.rs b/services/content-plugin-api/src/lib.rs index 49576cc0c..0b187e4ce 100644 --- a/services/content-plugin-api/src/lib.rs +++ b/services/content-plugin-api/src/lib.rs @@ -21,9 +21,9 @@ impl core::convert::TryFrom<&Message> for Opcode { } } -impl Into for Opcode { - fn into(self) -> Message { - match self { +impl From for Message { + fn from(opcode: Opcode) -> Message { + match opcode { Opcode::Redraw => Message::Scalar(ScalarMessage { id: 0, arg1: 0, @@ -31,7 +31,7 @@ impl Into 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, refer to helper method"), } } }