From 389d9988f3999031dcea56f182dabaa1e9b7ec63 Mon Sep 17 00:00:00 2001 From: Jonathan Turner Date: Tue, 30 Jul 2019 13:54:33 +1200 Subject: [PATCH] Change list/object to better short names --- src/object/base.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/object/base.rs b/src/object/base.rs index 3d3aadc6b2..abe86b2add 100644 --- a/src/object/base.rs +++ b/src/object/base.rs @@ -477,8 +477,12 @@ impl Value { .map(|e| e.source(&b.source).to_string()), "; ", ), - Value::Object(_) => format!("[object Object]"), - Value::List(_) => format!("[list List]"), + Value::Object(_) => format!("[{}]", self.type_name()), + Value::List(l) => format!( + "[{} {}]", + l.len(), + if l.len() == 1 { "item" } else { "items" } + ), Value::Binary(_) => format!(""), } }