From a15b561e614834cd6362b145dadc8cdeb4a6a124 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 25 Jul 2020 19:39:30 +0100 Subject: [PATCH] use lexpr for commands --- src/cmdlistener.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cmdlistener.rs b/src/cmdlistener.rs index e2c64ba8..694a6ec3 100644 --- a/src/cmdlistener.rs +++ b/src/cmdlistener.rs @@ -40,8 +40,8 @@ impl CommandStream { } } -impl From for MgmtError { - fn from(je: serde_json::Error) -> ME { +impl From for MgmtError { + fn from(je: serde_lexpr::Error) -> ME { ParseFailed(format!("{}", &je)) } } @@ -59,7 +59,7 @@ pub fn decode_and_process(s: &str) -> MgmtResponse { #[throws(ME)] fn decode_process_inner(s: &str)-> MgmtResponse { - let cmd : MgmtCommand = serde_json::from_str(s)?; + let cmd : MgmtCommand = serde_lexpr::from_str(s)?; execute(cmd)? } -- 2.30.2