From 7f48e8fe6668c5b2fdc62cc70e6bcffb744f411c Mon Sep 17 00:00:00 2001 From: Laurenz Date: Tue, 31 Aug 2021 16:25:12 +0200 Subject: Make user-facing "debug" representation use Debug instead of Display --- src/eval/array.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/eval/array.rs') diff --git a/src/eval/array.rs b/src/eval/array.rs index bae89c4b..17192cb3 100644 --- a/src/eval/array.rs +++ b/src/eval/array.rs @@ -1,6 +1,6 @@ use std::cmp::Ordering; use std::convert::TryFrom; -use std::fmt::{self, Debug, Display, Formatter, Write}; +use std::fmt::{self, Debug, Formatter, Write}; use std::iter::FromIterator; use std::ops::{Add, AddAssign}; use std::rc::Rc; @@ -119,16 +119,10 @@ fn out_of_bounds(index: i64, len: i64) -> String { } impl Debug for Array { - fn fmt(&self, f: &mut Formatter) -> fmt::Result { - f.debug_list().entries(self.0.iter()).finish() - } -} - -impl Display for Array { fn fmt(&self, f: &mut Formatter) -> fmt::Result { f.write_char('(')?; for (i, value) in self.iter().enumerate() { - Display::fmt(value, f)?; + value.fmt(f)?; if i + 1 < self.0.len() { f.write_str(", ")?; } -- cgit v1.2.3