Skip to content

Commit

Permalink
Add feature for deserializing bytes from an array
Browse files Browse the repository at this point in the history
  • Loading branch information
sosthene-nitrokey committed Oct 2, 2024
1 parent cbd34a5 commit da58de3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ serde = { version = "1", default-features = false, features = ["derive"] }
serde_bytes = "0.11.12"

[features]
bytes-from-array = []
log-all = []
log-none = []
log-info = []
Expand Down
1 change: 1 addition & 0 deletions src/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,7 @@ impl<'de, 'a> de::Deserializer<'de> for &'a mut Deserializer<'de> {
{
let major = self.peek_major()?;
match major {
#[cfg(feature = "bytes-from-array")]
MAJOR_ARRAY => {
let len = self.raw_deserialize_u32(MAJOR_ARRAY)?;
visitor.visit_seq(SeqAccess {
Expand Down

0 comments on commit da58de3

Please sign in to comment.