aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2019-02-18 22:46:43 +0000
committerRobin Krahl <robin.krahl@ireas.org>2019-02-18 23:47:26 +0100
commit3c4d23dd5f202eaba09b408d071e513f13df11cf (patch)
tree1f62ead67b68860018f309abca090658c0526a19 /src
parentf80cef80cf685066fb50385e14568bf86e700d88 (diff)
downloadntw-3c4d23dd5f202eaba09b408d071e513f13df11cf.tar.gz
ntw-3c4d23dd5f202eaba09b408d071e513f13df11cf.tar.bz2
Fix formatting in commands.rs
Diffstat (limited to 'src')
-rw-r--r--src/commands.rs12
1 files 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::<Self::Request>(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 {