From 3c4d23dd5f202eaba09b408d071e513f13df11cf Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Mon, 18 Feb 2019 22:46:43 +0000 Subject: Fix formatting in commands.rs --- src/commands.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/commands.rs b/src/commands.rs index d2769ed..e8e332b 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -3,8 +3,8 @@ use core::default::Default; -use serde::{Deserialize, Serialize}; use serde::de::DeserializeOwned; +use serde::{Deserialize, Serialize}; use crate::device::CommandStatus; @@ -28,12 +28,10 @@ trait Command { // TODO: better error if (de-)serialization fails if let Ok((request, _)) = ssmarshal::deserialize::(data) { match Self::execute(request) { - Ok(response) => { - match ssmarshal::serialize(buf, &response) { - Ok(_) => CommandStatus::Ok, - Err(_) => CommandStatus::NotSupported, - } - } + Ok(response) => match ssmarshal::serialize(buf, &response) { + Ok(_) => CommandStatus::Ok, + Err(_) => CommandStatus::NotSupported, + }, Err(status) => status, } } else { -- cgit v1.2.1