diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:03:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:03:36 +0000 |
commit | 17d40c6057c88f4c432b0d7bac88e1b84cb7e67f (patch) | |
tree | 3f66c4a5918660bb8a758ab6cda5ff8ee4f6cdcd /vendor/serde_json/src/value/mod.rs | |
parent | Adding upstream version 1.64.0+dfsg1. (diff) | |
download | rustc-f7f0cc2a5d72e2c61c1f6900e70eec992bea4273.tar.xz rustc-f7f0cc2a5d72e2c61c1f6900e70eec992bea4273.zip |
Adding upstream version 1.65.0+dfsg1.upstream/1.65.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | vendor/serde_json/src/value/mod.rs | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/vendor/serde_json/src/value/mod.rs b/vendor/serde_json/src/value/mod.rs index 4793e93ec..c467df6cc 100644 --- a/vendor/serde_json/src/value/mod.rs +++ b/vendor/serde_json/src/value/mod.rs @@ -177,19 +177,17 @@ pub enum Value { impl Debug for Value { fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { match self { - Value::Null => formatter.debug_tuple("Null").finish(), - Value::Bool(v) => formatter.debug_tuple("Bool").field(v).finish(), - Value::Number(v) => Debug::fmt(v, formatter), - Value::String(v) => formatter.debug_tuple("String").field(v).finish(), - Value::Array(v) => { - formatter.write_str("Array(")?; - Debug::fmt(v, formatter)?; - formatter.write_str(")") + Value::Null => formatter.write_str("Null"), + Value::Bool(boolean) => write!(formatter, "Bool({})", boolean), + Value::Number(number) => Debug::fmt(number, formatter), + Value::String(string) => write!(formatter, "String({:?})", string), + Value::Array(vec) => { + formatter.write_str("Array ")?; + Debug::fmt(vec, formatter) } - Value::Object(v) => { - formatter.write_str("Object(")?; - Debug::fmt(v, formatter)?; - formatter.write_str(")") + Value::Object(map) => { + formatter.write_str("Object ")?; + Debug::fmt(map, formatter) } } } |