aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2023-08-17 08:59:05 +0200
committerMartin Fischer <martin@push-f.com>2023-08-19 11:41:55 +0200
commitc169e78f120ea9be451f337306b8bff6c1fb4955 (patch)
treed04dd60435a2191f3d34b3680a87d92ff5df0edc /tests
parent91074b6e7e6e8463f15ca26bc39e70b80f954227 (diff)
refactor!: remove Span trait, just use Range
`std::mem::size_of::<Range<NoopOffset>>()` is 0 so there's no need to abstract over Range.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_spans.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_spans.rs b/tests/test_spans.rs
index f8e54a2..b41b1b9 100644
--- a/tests/test_spans.rs
+++ b/tests/test_spans.rs
@@ -6,14 +6,14 @@ use codespan_reporting::{
files::SimpleFiles,
term::{self, termcolor::Buffer},
};
-use html5tokenizer::{spans::PosTrackingReader, DefaultEmitter, Token, Tokenizer};
+use html5tokenizer::{offset::PosTrackingReader, DefaultEmitter, Token, Tokenizer};
use insta::assert_snapshot;
use pretty_assertions::assert_eq;
-fn tokenizer(html: &'static str) -> impl Iterator<Item = Token<Range<usize>>> {
+fn tokenizer(html: &'static str) -> impl Iterator<Item = Token<usize>> {
Tokenizer::new(
PosTrackingReader::new(html),
- DefaultEmitter::<_, Range<usize>>::default(),
+ DefaultEmitter::<_, usize>::default(),
)
.flatten()
}