summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--examples/tokenize.rs2
-rw-r--r--src/emitter.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/README.md b/README.md
index 13d9cc2..70b5be6 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@ use std::fmt::Write;
use html5tokenizer::{DefaultEmitter, Tokenizer, Token};
let html = "<title >hello world</title>";
-let emitter = DefaultEmitter::<_, ()>::default();
+let emitter = DefaultEmitter::<_>::default();
let mut new_html = String::new();
for token in Tokenizer::new(html, emitter).flatten() {
diff --git a/examples/tokenize.rs b/examples/tokenize.rs
index 5776362..54ba0ec 100644
--- a/examples/tokenize.rs
+++ b/examples/tokenize.rs
@@ -7,7 +7,7 @@ use std::io::BufReader;
fn main() {
for token in Tokenizer::new(
BufReader::new(std::io::stdin().lock()),
- DefaultEmitter::<_, ()>::default(),
+ DefaultEmitter::<_>::default(),
)
.flatten()
{
diff --git a/src/emitter.rs b/src/emitter.rs
index 769d233..e441eb7 100644
--- a/src/emitter.rs
+++ b/src/emitter.rs
@@ -159,7 +159,7 @@ pub trait Emitter<R> {
}
/// The default implementation of [`Emitter`], used to produce tokens.
-pub struct DefaultEmitter<R, S> {
+pub struct DefaultEmitter<R, S = ()> {
current_characters: String,
current_token: Option<Token<S>>,
current_attribute: Option<(String, Attribute<S>)>,