diff options
author | Alex Auvolat <alex@adnab.me> | 2022-06-03 14:16:30 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-06-03 14:16:30 +0200 |
commit | 16e0a655d0d01e3871aee81a0a9660102d6df74e (patch) | |
tree | dacb8b88e3ac4f559111ce3f03f6e8fb977b25ee /src/util | |
parent | d3d7df098b4188ea26d3cec29f2cc226d55d783e (diff) | |
download | garage-16e0a655d0d01e3871aee81a0a9660102d6df74e.tar.gz garage-16e0a655d0d01e3871aee81a0a9660102d6df74e.zip |
Update rmp-serde
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/Cargo.toml | 2 | ||||
-rw-r--r-- | src/util/data.rs | 2 | ||||
-rw-r--r-- | src/util/persister.rs | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/util/Cargo.toml b/src/util/Cargo.toml index 5d073436..e68704ad 100644 --- a/src/util/Cargo.toml +++ b/src/util/Cargo.toml @@ -25,7 +25,7 @@ rand = "0.8" sha2 = "0.9" chrono = "0.4" -rmp-serde = "0.15" +rmp-serde = "1.1" serde = { version = "1.0", default-features = false, features = ["derive", "rc"] } serde_json = "1.0" toml = "0.5" diff --git a/src/util/data.rs b/src/util/data.rs index 7715c2cc..2ef976a5 100644 --- a/src/util/data.rs +++ b/src/util/data.rs @@ -151,7 +151,7 @@ where let mut wr = Vec::with_capacity(128); let mut se = rmp_serde::Serializer::new(&mut wr) .with_struct_map() - .with_string_variants(); + .with_binary(); val.serialize(&mut se)?; Ok(wr) } diff --git a/src/util/persister.rs b/src/util/persister.rs index 9e1a1910..d0759db7 100644 --- a/src/util/persister.rs +++ b/src/util/persister.rs @@ -33,7 +33,7 @@ where let mut bytes = vec![]; file.read_to_end(&mut bytes)?; - let value = rmp_serde::decode::from_read_ref(&bytes[..])?; + let value = rmp_serde::decode::from_slice(&bytes[..])?; Ok(value) } @@ -57,7 +57,7 @@ where let mut bytes = vec![]; file.read_to_end(&mut bytes).await?; - let value = rmp_serde::decode::from_read_ref(&bytes[..])?; + let value = rmp_serde::decode::from_slice(&bytes[..])?; Ok(value) } |