Skip to content

Commit

Permalink
Fix with --all-features
Browse files Browse the repository at this point in the history
  • Loading branch information
maciejhirsz committed Jun 15, 2022
1 parent b4284d9 commit bf2b1c3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/features/serde/de_borrowed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ impl<'a, 'de, DE: BorrowDecoder<'de>> Deserializer<'de> for SerdeDecoder<'a, 'de
where
V: serde::de::Visitor<'de>,
{
let variant = crate::de::decode_option_variant(&mut self.de, "Option<T>")?;
let variant = crate::de::decode_option_variant(&mut self.de)?;
if variant.is_some() {
visitor.visit_some(self)
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/features/serde/de_owned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ impl<'a, 'de, DE: Decoder> Deserializer<'de> for SerdeDecoder<'a, DE> {
where
V: serde::de::Visitor<'de>,
{
let variant = crate::de::decode_option_variant(&mut self.de, "Option<T>")?;
let variant = crate::de::decode_option_variant(&mut self.de)?;
if variant.is_some() {
visitor.visit_some(self)
} else {
Expand Down
2 changes: 1 addition & 1 deletion tests/issues/issue_498.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fn test_issue_498() {
bincode::decode_from_slice(&bytes, bincode::config::legacy().with_limit::<1024>());

match out.unwrap_err() {
bincode::error::DecodeError::CStringNulError { inner: _ } => {}
bincode::error::DecodeError::CStringNulError { position: _ } => {}
err => panic!("Expected CStringNullErr, found {:?}", err),
}
}

0 comments on commit bf2b1c3

Please sign in to comment.