summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--integration_tests/tests/test_html5lib.rs6
-rw-r--r--src/tokenizer.rs6
2 files changed, 7 insertions, 5 deletions
diff --git a/integration_tests/tests/test_html5lib.rs b/integration_tests/tests/test_html5lib.rs
index 7511f11..fd69524 100644
--- a/integration_tests/tests/test_html5lib.rs
+++ b/integration_tests/tests/test_html5lib.rs
@@ -3,7 +3,9 @@ use std::{fs::File, io::BufReader, path::Path};
use html5lib_tests::{
parse_tests, Error as TestError, InitialState, Output, Test, Token as TestToken,
};
-use html5tokenizer::{reader::Reader, DefaultEmitter, InternalState, Token, Tokenizer};
+use html5tokenizer::{
+ offset::NoopOffset, reader::Reader, DefaultEmitter, InternalState, Token, Tokenizer,
+};
use similar_asserts::assert_eq;
/// Path to a local checkout of [html5lib-tests], relative to the
@@ -92,7 +94,7 @@ fn run_test_inner<R: Reader>(
test_i: usize,
test: &Test,
state: &InitialState,
- mut tokenizer: Tokenizer<R>,
+ mut tokenizer: Tokenizer<R, NoopOffset, DefaultEmitter>,
tokenizer_info: &str,
) {
println!(
diff --git a/src/tokenizer.rs b/src/tokenizer.rs
index d8f1b95..3a75e60 100644
--- a/src/tokenizer.rs
+++ b/src/tokenizer.rs
@@ -1,10 +1,10 @@
use crate::machine;
-use crate::offset::{NoopOffset, Offset, Position};
+use crate::offset::{Offset, Position};
use crate::reader::{IntoReader, Reader};
use crate::utils::{
control_pat, noncharacter_pat, surrogate_pat, ControlToken, State as InternalState,
};
-use crate::{DefaultEmitter, Emitter, Error};
+use crate::{Emitter, Error};
// this is a stack that can hold 0 to 2 Ts
#[derive(Debug, Default, Clone, Copy)]
@@ -33,7 +33,7 @@ impl<T: Copy> Stack2<T> {
}
/// An HTML tokenizer. See crate-level docs for basic usage.
-pub struct Tokenizer<R: Reader, O = NoopOffset, E: Emitter<O> = DefaultEmitter<O>> {
+pub struct Tokenizer<R: Reader, O, E: Emitter<O>> {
eof: bool,
pub(crate) state: InternalState,
pub(crate) emitter: E,