diff options
author | Martin Fischer <martin@push-f.com> | 2023-08-17 08:59:05 +0200 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2023-08-19 11:41:55 +0200 |
commit | c169e78f120ea9be451f337306b8bff6c1fb4955 (patch) | |
tree | d04dd60435a2191f3d34b3680a87d92ff5df0edc /src/tokenizer.rs | |
parent | 91074b6e7e6e8463f15ca26bc39e70b80f954227 (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 'src/tokenizer.rs')
-rw-r--r-- | src/tokenizer.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tokenizer.rs b/src/tokenizer.rs index 7b8b1ce..141efb9 100644 --- a/src/tokenizer.rs +++ b/src/tokenizer.rs @@ -1,6 +1,6 @@ use crate::machine; +use crate::offset::NoopOffset; use crate::reader::{IntoReader, Reader}; -use crate::spans::Position; use crate::utils::{ control_pat, noncharacter_pat, surrogate_pat, ControlToken, State as InternalState, }; @@ -33,7 +33,7 @@ impl<T: Copy> Stack2<T> { } /// A HTML tokenizer. See crate-level docs for basic usage. -pub struct Tokenizer<R: Reader, E: Emitter<R> = DefaultEmitter<R, ()>> { +pub struct Tokenizer<R: Reader, E: Emitter<R> = DefaultEmitter<R, NoopOffset>> { eof: bool, pub(crate) state: InternalState, pub(crate) emitter: E, |