Merge branch 'v1.3-fixes'

This commit is contained in:
Stephen Chung
2021-12-16 16:10:39 +08:00
7 changed files with 97 additions and 44 deletions

View File

@@ -703,7 +703,16 @@ impl fmt::Debug for Dynamic {
#[cfg(not(feature = "no_index"))]
Union::Array(ref value, _, _) => fmt::Debug::fmt(value, f),
#[cfg(not(feature = "no_index"))]
Union::Blob(ref value, _, _) => fmt::Debug::fmt(value, f),
Union::Blob(ref value, _, _) => {
f.write_str("[")?;
value.iter().enumerate().try_for_each(|(i, v)| {
if i > 0 && i % 8 == 0 {
f.write_str(" ")?;
}
write!(f, "{:02x}", v)
})?;
f.write_str("]")
}
#[cfg(not(feature = "no_object"))]
Union::Map(ref value, _, _) => {
f.write_str("#")?;