feat: Implement serialization/deserialization for booleans

This commit is contained in:
new-years-eve authored and Ellis Git committed 2026-05-04 20:05:26 +00:00
1 parent e95c0bd53f
commit 5fa3087401
2 files changed
+10 -4

No files matched your search

+8 -2
View File
@@ -288,8 +288,14 @@ impl<'a, 'de: 'a> de::Deserializer<'de> for &'a mut Deserializer<'de> {
}
#[cfg_attr(unabridged, tracing::instrument(level = "trace", skip_all))]
fn deserialize_bool<V: Visitor<'de>>(self, _visitor: V) -> Result<V::Value> {
unhandled!("deserialize bool not implemented")
fn deserialize_bool<V: Visitor<'de>>(self, visitor: V) -> Result<V::Value> {
let byte = self
.buf
.get(self.pos)
.ok_or(Self::Error::SerdeDe("bool buffer underflow".into()))?;
self.inc_pos(1);
visitor.visit_bool(*byte != 0x00)
}
#[cfg_attr(unabridged, tracing::instrument(level = "trace", skip_all))]