Skip to content

Commit

Permalink
Removes CborPacked. (#873)
Browse files Browse the repository at this point in the history
In serde_cbor 0.9, the helper function to_vec_packed created the smallest
CBOR representation of data.  When serde_cbor 0.10 was introduced, that
function was left in place and the documentation for it didn't change, but
its behavior did.  Specifically, enum variants that carry data would no
longer have the variant encoded efficiently; instead it was encoded as a
String.  As such, using to_vec_packed is not the way to get a compact
representation if your data contains enums which carry data.

Since there hasn't been a yew release yet that has CBorPacked in it,
this commit removes CborPacked.
  • Loading branch information
ctm authored and jstarry committed Jan 19, 2020
1 parent 1abef04 commit ffadafe
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 34 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ agent = ["bincode"]
yaml = ["serde_yaml"]
msgpack = ["rmp-serde"]
cbor = ["serde_cbor"]
cbor_packed = ["serde_cbor"]

[workspace]
members = [
Expand Down
29 changes: 0 additions & 29 deletions src/format/cbor_packed.rs

This file was deleted.

4 changes: 0 additions & 4 deletions src/format/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ pub mod macros;
pub mod bincode;
#[cfg(feature = "cbor")]
pub mod cbor;
#[cfg(feature = "cbor_packed")]
pub mod cbor_packed;
pub mod json;
#[cfg(feature = "msgpack")]
pub mod msgpack;
Expand All @@ -29,8 +27,6 @@ pub mod yaml;
pub use self::bincode::Bincode;
#[cfg(feature = "cbor")]
pub use self::cbor::Cbor;
#[cfg(feature = "cbor_packed")]
pub use self::cbor_packed::CborPacked;
pub use self::json::Json;
#[cfg(feature = "msgpack")]
pub use self::msgpack::MsgPack;
Expand Down

0 comments on commit ffadafe

Please sign in to comment.