From 2e77b1c836220766398e379ae0157736fb448874 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 4 Jan 2021 21:29:15 +0100 Subject: =?UTF-8?q?Better=20value=20representations,=20type=20function=20?= =?UTF-8?q?=F0=9F=8C=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/syntax/span.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/syntax') diff --git a/src/syntax/span.rs b/src/syntax/span.rs index 3be770b8..e924b03b 100644 --- a/src/syntax/span.rs +++ b/src/syntax/span.rs @@ -269,14 +269,14 @@ impl Location { } } -impl Debug for Location { +impl Display for Location { fn fmt(&self, f: &mut Formatter) -> fmt::Result { - Display::fmt(self, f) + write!(f, "{}:{}", self.line, self.column) } } -impl Display for Location { +impl Debug for Location { fn fmt(&self, f: &mut Formatter) -> fmt::Result { - write!(f, "{}:{}", self.line, self.column) + Display::fmt(self, f) } } -- cgit v1.2.3