Serde with bytes maps to Blob (#6009)

* Serde with_bytes maps to Blob

* Bump rust flexbuffers minor version number

Co-authored-by: Casper Neo <cneo@google.com>
This commit is contained in:
Casper
2020-06-28 19:58:08 -07:00
committed by GitHub
parent e810635eaa
commit 8a721f69a1
5 changed files with 14 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
[package]
name = "flexbuffers"
version = "0.1.0"
version = "0.1.1"
authors = ["Casper Neo <cneo@google.com>", "FlatBuffers Maintainers"]
edition = "2018"
license = "Apache-2.0"
@@ -16,4 +16,3 @@ serde_derive = "1.0"
byteorder = "1.3.2"
num_enum = "0.5.0"
bitflags = "1.2.1"

View File

@@ -270,7 +270,7 @@ impl<'a> ser::Serializer for &'a mut FlexbufferSerializer {
self.finish_if_not_nested()
}
fn serialize_bytes(self, v: &[u8]) -> Result<Self::Ok, Self::Error> {
self.builder.push(v);
self.builder.push(crate::Blob(v));
self.finish_if_not_nested()
}
fn serialize_none(self) -> Result<Self::Ok, Self::Error> {