commit | d331a4ea0c1ee80119d78b71e456d7f5890f57dd | [log] [tgz] |
---|---|---|
author | David Tolnay <dtolnay@gmail.com> | Sun Sep 23 17:51:28 2018 |
committer | David Tolnay <dtolnay@gmail.com> | Sun Sep 23 17:51:38 2018 |
tree | ca37f41a1d30d7b3b144c4a059e7ebff65cac6a6 | |
parent | 2743f9445e4550ad11336979691fc201521aad3f [diff] |
Add Default for Box<RawValue> Equivalent behavior to Default for Value.
diff --git a/src/raw.rs b/src/raw.rs index f63d102..989c39d 100644 --- a/src/raw.rs +++ b/src/raw.rs
@@ -149,6 +149,12 @@ } } +impl Default for Box<RawValue> { + fn default() -> Self { + RawValue::from_borrowed("null").to_owned() + } +} + impl Debug for RawValue { fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { formatter