From 248888ce0bd07ab3eefb7932b2492e7ce33d7be0 Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Sun, 21 Aug 2022 17:35:37 +0800 Subject: [PATCH] Fine tune error display. --- src/types/parse_error.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/types/parse_error.rs b/src/types/parse_error.rs index b1cbf12a..a80255f0 100644 --- a/src/types/parse_error.rs +++ b/src/types/parse_error.rs @@ -51,8 +51,7 @@ impl fmt::Display for LexError { Self::ImproperSymbol(s, d) if d.is_empty() => { write!(f, "Invalid symbol encountered: '{}'", s) } - Self::ImproperSymbol(s, d) if s.is_empty() => f.write_str(d), - Self::ImproperSymbol(s, d) => write!(f, "{}: '{}'", d, s), + Self::ImproperSymbol(.., d) => f.write_str(d), } } }