libc = "0.2"
-serde-lexpr = "0.1"
+serde-lexpr = "0.1" #xxx
+ron = "0.6"
#rocket = "0.4"
rocket_contrib = { version = "0.4", default-features=false, features=["tera_templates","helmet","json"], git = "file:///home/ian/Rustup/Game/rocket/.git" branch = "Game-rocket-contrib" }
}
}
-impl From<serde_lexpr::Error> for MgmtError {
- fn from(je: serde_lexpr::Error) -> ME {
+impl From<ron::error::Error> for MgmtError {
+ fn from(je: ron::error::Error) -> ME {
ParseFailed(format!("{}", &je))
}
}
.unwrap_or_else(|e| MgmtResponse::Error {
error: MgmtError::ParseFailed(format!("{}", e))
});
- serde_lexpr::to_writer(&mut cs.write, &resp)?;
+ ron::ser::to_writer(&mut cs.write, &resp)?;
}
#[throws(ME)]
fn decode_process_inner(cs: &mut CommandStream, s: &str)-> MgmtResponse {
- let cmd : MgmtCommand = serde_lexpr::from_str(s)?;
+ let cmd : MgmtCommand = ron::de::from_str(s)?;
execute(cs, cmd)?
}