diff options
author | Alex Auvolat <alex@adnab.me> | 2021-10-13 12:33:14 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-10-13 12:33:14 +0200 |
commit | 8dede69dee20b812ad1dcab5b374c60232409f4f (patch) | |
tree | 0b9ae54f27b4fb7bd6cfd09e1d78a70facf01a33 /src/client.rs | |
parent | d9bd1182f7b980df8e631ae8eeca444f5d997909 (diff) | |
download | netapp-8dede69dee20b812ad1dcab5b374c60232409f4f.tar.gz netapp-8dede69dee20b812ad1dcab5b374c60232409f4f.zip |
Fix netapp protocol & adapt basalt to new api
Diffstat (limited to 'src/client.rs')
-rw-r--r-- | src/client.rs | 7 |
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))) } |