aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/tokenize.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/examples/tokenize.rs b/examples/tokenize.rs
index ceb5751..5776362 100644
--- a/examples/tokenize.rs
+++ b/examples/tokenize.rs
@@ -1,9 +1,16 @@
//! Let's you easily try out the tokenizer with e.g.
//! printf '<h1>Hello world!</h1>' | cargo run --example=tokenize
-use html5tokenizer::{BufReadReader, Tokenizer};
+
+use html5tokenizer::{DefaultEmitter, Tokenizer};
+use std::io::BufReader;
fn main() {
- for token in Tokenizer::new(BufReadReader::new(std::io::stdin().lock())).flatten() {
+ for token in Tokenizer::new(
+ BufReader::new(std::io::stdin().lock()),
+ DefaultEmitter::<_, ()>::default(),
+ )
+ .flatten()
+ {
println!("{:?}", token);
}
}