From e78363951446454de163b3f3d9b639a04787fa38 Mon Sep 17 00:00:00 2001 From: Richard Dodd Date: Thu, 10 Jan 2019 23:39:36 +0000 Subject: [PATCH] Make clear it's a JsValue. --- src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 7834819b8378..ac961fec0868 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -529,7 +529,8 @@ impl Clone for JsValue { #[cfg(feature = "std")] impl fmt::Debug for JsValue { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str(&self.as_debug_string()) + use std::fmt::Write; + write!(f, "JsValue({})", self.as_debug_string()) } } @@ -538,7 +539,7 @@ impl fmt::Debug for JsValue { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { // TODO before merge - this is less info than before - is this OK? Can we do the above // without using allocation (no_std)? - f.write_str("[object]") + f.write_str("JsValue(..)") } }