From bd0127df56314f4ee95ca863a68084d5636230fd Mon Sep 17 00:00:00 2001 From: Bugen Zhao Date: Thu, 9 Nov 2023 13:25:38 +0800 Subject: [PATCH] refine display impl Signed-off-by: Bugen Zhao --- sqllogictest/src/parser.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sqllogictest/src/parser.rs b/sqllogictest/src/parser.rs index c7c4b67..c63ed34 100644 --- a/sqllogictest/src/parser.rs +++ b/sqllogictest/src/parser.rs @@ -376,9 +376,9 @@ impl ExpectedError { impl std::fmt::Display for ExpectedError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { - ExpectedError::Empty => Ok(()), - ExpectedError::Inline(regex) => regex.fmt(f), - ExpectedError::Multiline(results) => write!(f, "{}", results.trim()), + ExpectedError::Empty => write!(f, "(any)"), + ExpectedError::Inline(regex) => write!(f, "(regex) {}", regex), + ExpectedError::Multiline(results) => write!(f, "(multiline) {}", results.trim()), } } }