summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2021-12-03 10:50:05 +0100
committerMartin Fischer <martin@push-f.com>2021-12-05 02:52:36 +0100
commitb17d8055dfe0d57865fbad9419a07e30be378c67 (patch)
tree6cafa9629e452092427d6e76574b13609a0b999f /tests
parenta7934a1dfd5735af335388b7c57f086132a57d3a (diff)
spans: get rid of code duplication by introducing Span trait
Diffstat (limited to 'tests')
-rw-r--r--tests/test_spans.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/test_spans.rs b/tests/test_spans.rs
index aeb4a94..5b1e814 100644
--- a/tests/test_spans.rs
+++ b/tests/test_spans.rs
@@ -1,4 +1,4 @@
-use std::include_str;
+use std::{include_str, ops::Range};
use codespan_reporting::{
self,
@@ -6,10 +6,7 @@ use codespan_reporting::{
files::SimpleFiles,
term::{self, termcolor::Buffer},
};
-use html5gum::{
- spans::{PosTracker, SpanEmitter},
- Readable, Token, Tokenizer,
-};
+use html5gum::{spans::PosTracker, DefaultEmitter, Readable, StringReader, Token, Tokenizer};
#[test]
fn test() {
@@ -24,7 +21,7 @@ fn test() {
reader: html.to_reader(),
position: 0,
},
- SpanEmitter::default(),
+ DefaultEmitter::<PosTracker<StringReader>, Range<usize>>::default(),
)
.infallible()
{