diff options
Diffstat (limited to 'examples/tokenize.rs')
-rw-r--r-- | examples/tokenize.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/examples/tokenize.rs b/examples/tokenize.rs index dc3b476..bea6a84 100644 --- a/examples/tokenize.rs +++ b/examples/tokenize.rs @@ -14,9 +14,7 @@ use std::io; use html5tokenizer::BufferQueue; use html5tokenizer::{CharacterTokens, EndTag, NullCharacterToken, StartTag, TagToken}; -use html5tokenizer::{ - ParseError, Token, TokenSink, TokenSinkResult, Tokenizer, TokenizerOpts, -}; +use html5tokenizer::{ParseError, Token, TokenSink, TokenSinkResult, Tokenizer, TokenizerOpts}; use io::Read; #[derive(Copy, Clone)] @@ -49,7 +47,7 @@ impl TokenSink for TokenPrinter { for c in b.chars() { self.do_char(c); } - }, + } NullCharacterToken => self.do_char('\0'), TagToken(tag) => { self.is_char(false); @@ -68,15 +66,15 @@ impl TokenSink for TokenPrinter { print!(" \x1b[31m/\x1b[0m"); } println!(">"); - }, + } ParseError(err) => { self.is_char(false); println!("ERROR: {}", err); - }, + } _ => { self.is_char(false); println!("OTHER: {:?}", token); - }, + } } TokenSinkResult::Continue } |