From 11316f041985345dd3a712d14bea749790f937a4 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Thu, 17 Aug 2023 18:07:32 +0200 Subject: break!: stop abusing Display for Error codes Display impls should return human-readable strings. After this commit we're able to introduce a proper Display impl in the future without that being a breaking change. --- tests/test_spans.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test_spans.rs b/tests/test_spans.rs index 70bcf6e..10735b2 100644 --- a/tests/test_spans.rs +++ b/tests/test_spans.rs @@ -202,7 +202,7 @@ fn annotate_errors(html: &'static str) -> String { let mut labels = Vec::new(); for token in tokenizer(html) { if let Token::Error { error, span } = token { - labels.push((span, error.to_string())); + labels.push((span, error.code())); } } annotate(html, labels) -- cgit v1.2.3