We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c443e6 commit 6c258daCopy full SHA for 6c258da
src/value.rs
@@ -332,7 +332,7 @@ impl Serialize for Value<'_> {
332
map.end()
333
}
334
Value::Literal(v) => s.collect_str(v),
335
- Value::Owned(v) => Bytes(v).serialize(s),
+ Value::Owned(v) => s.serialize_bytes(v),
336
337
338
@@ -460,14 +460,3 @@ impl From<i64> for Value<'_> {
460
Value::Number(Number::Dec(value))
461
462
463
-
464
-/// Helper type to enforce that serialize_bytes() is used in serialization.
465
-#[cfg(feature = "serde")]
466
-pub(crate) struct Bytes<'a>(pub &'a [u8]);
467
468
469
-impl Serialize for Bytes<'_> {
470
- fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
471
- s.serialize_bytes(self.0)
472
- }
473
-}
0 commit comments