aboutsummaryrefslogtreecommitdiff
path: root/src/client.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.rs')
-rw-r--r--src/client.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client.rs b/src/client.rs
index a436d53..127ff46 100644
--- a/src/client.rs
+++ b/src/client.rs
@@ -145,12 +145,13 @@ impl ClientConn {
return Err(Error::Message("Response is 0 bytes, either a collision or a protocol error".into()));
}
+ trace!("request response {}: ", id);
+
let code = resp[0];
if code == 0 {
- rmp_serde::decode::from_read_ref::<_, Result<<T as Message>::Response, String>>(
+ Ok(rmp_serde::decode::from_read_ref::<_, <T as Message>::Response>(
&resp[1..],
- )?
- .map_err(Error::Remote)
+ )?)
} else {
Err(Error::Remote(format!("Remote error code {}", code)))
}