aboutsummaryrefslogtreecommitdiff
path: root/tests/test_spans.rs
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2023-08-11 23:04:09 +0200
committerMartin Fischer <martin@push-f.com>2023-08-19 06:41:55 +0200
commit8bc84de0213d60e810620a97449f83dc1bc9f13e (patch)
tree8f8a1b0ae13015281b1fca7a813d41656c5e16a1 /tests/test_spans.rs
parent2c6021ffa738b38be9a51a6ba4872d018404afc1 (diff)
break!: privatize PosTrackingReader fields
Diffstat (limited to 'tests/test_spans.rs')
-rw-r--r--tests/test_spans.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/tests/test_spans.rs b/tests/test_spans.rs
index da3f09c..64a64cf 100644
--- a/tests/test_spans.rs
+++ b/tests/test_spans.rs
@@ -6,9 +6,7 @@ use codespan_reporting::{
files::SimpleFiles,
term::{self, termcolor::Buffer},
};
-use html5tokenizer::{
- spans::PosTrackingReader, DefaultEmitter, IntoReader, StringReader, Token, Tokenizer,
-};
+use html5tokenizer::{spans::PosTrackingReader, DefaultEmitter, Token, Tokenizer};
#[test]
fn test() {
@@ -19,11 +17,8 @@ fn test() {
let mut labels = Vec::new();
for token in Tokenizer::new_with_emitter(
- PosTrackingReader {
- reader: html.into_reader(),
- position: 0,
- },
- DefaultEmitter::<PosTrackingReader<StringReader>, Range<usize>>::default(),
+ PosTrackingReader::new(html),
+ DefaultEmitter::<_, Range<usize>>::default(),
)
.flatten()
{