diff options
author | Alex <alex@adnab.me> | 2023-10-23 09:24:40 +0000 |
---|---|---|
committer | Alex <alex@adnab.me> | 2023-10-23 09:24:40 +0000 |
commit | 170ddbfac4b91446560aadde758925a73714ea63 (patch) | |
tree | d10ecdbc6a0afc06a5dbbe08e133a995ee279258 | |
parent | b7beb15492258b5cc9e408bcb00d549e8b50e176 (diff) | |
parent | 2484d7654ace3021cce024d301d575b8eef23ee9 (diff) | |
download | netapp-170ddbfac4b91446560aadde758925a73714ea63.tar.gz netapp-170ddbfac4b91446560aadde758925a73714ea63.zip |
Merge pull request 'netapp 0.10' (#12) from next-0.10 into mainmain
Reviewed-on: https://git.deuxfleurs.fr/lx/netapp/pulls/12
-rw-r--r-- | Cargo.lock | 6 | ||||
-rw-r--r-- | Cargo.toml | 4 | ||||
-rw-r--r-- | src/message.rs | 4 | ||||
-rw-r--r-- | src/util.rs | 4 | ||||
l--------- | target | 1 |
5 files changed, 9 insertions, 10 deletions
@@ -428,7 +428,7 @@ dependencies = [ [[package]] name = "netapp" -version = "0.5.4" +version = "0.10.0" dependencies = [ "arc-swap", "async-trait", @@ -677,9 +677,9 @@ dependencies = [ [[package]] name = "rmp-serde" -version = "0.15.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "723ecff9ad04f4ad92fe1c8ca6c20d2196d9286e9c60727c4cb5511629260e9d" +checksum = "bffea85eea980d8a74453e5d02a8d93028f3c34725de143085a844ebe953258a" dependencies = [ "byteorder", "rmp", @@ -1,6 +1,6 @@ [package] name = "netapp" -version = "0.5.4" +version = "0.10.0" authors = ["Alex Auvolat <alex@adnab.me>"] edition = "2018" license-file = "LICENSE" @@ -27,7 +27,7 @@ tokio-util = { version = "0.7", default-features = false, features = ["compat", tokio-stream = "0.1.7" serde = { version = "1.0", default-features = false, features = ["derive", "rc"] } -rmp-serde = "0.15" +rmp-serde = "1.1" hex = "0.4.2" rand = { version = "0.8" } diff --git a/src/message.rs b/src/message.rs index cd40ea7..b0d255c 100644 --- a/src/message.rs +++ b/src/message.rs @@ -155,7 +155,7 @@ impl<M: Message> Req<M> { } pub(crate) fn from_enc(enc: ReqEnc) -> Result<Self, rmp_serde::decode::Error> { - let msg = rmp_serde::decode::from_read_ref(&enc.msg)?; + let msg = rmp_serde::decode::from_slice(&enc.msg)?; Ok(Req { msg: Arc::new(msg), msg_ser: Some(enc.msg), @@ -316,7 +316,7 @@ impl<M: Message> Resp<M> { } pub(crate) fn from_enc(enc: RespEnc) -> Result<Self, Error> { - let msg = rmp_serde::decode::from_read_ref(&enc.msg)?; + let msg = rmp_serde::decode::from_slice(&enc.msg)?; Ok(Self { _phantom: Default::default(), msg, diff --git a/src/util.rs b/src/util.rs index edf8c49..56230b7 100644 --- a/src/util.rs +++ b/src/util.rs @@ -17,9 +17,7 @@ where T: Serialize + ?Sized, { let mut wr = Vec::with_capacity(128); - let mut se = rmp_serde::Serializer::new(&mut wr) - .with_struct_map() - .with_string_variants(); + let mut se = rmp_serde::Serializer::new(&mut wr).with_struct_map(); val.serialize(&mut se)?; Ok(wr) } @@ -0,0 +1 @@ +/home/lx.nobackup/rust/netapp.target/
\ No newline at end of file |