aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2023-08-17 18:07:32 +0200
committerMartin Fischer <martin@push-f.com>2023-08-19 13:41:55 +0200
commit11316f041985345dd3a712d14bea749790f937a4 (patch)
treee7f4425e047d7a8245e98f5c3a4b2afc8a5a6ba7 /tests
parent378662fa52bbc3e9e4a210f649093dcdadf51afa (diff)
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_spans.rs2
1 files changed, 1 insertions, 1 deletions
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)