aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2021-11-19 07:54:49 +0100
committerMartin Fischer <martin@push-f.com>2021-11-19 07:54:49 +0100
commit29f4f54fdb173c93f17b8515e7cb459d78bc0068 (patch)
tree491ffebfe4cbd04326205ff54f084b92d209c682 /examples
parentc914b71a28ce7177171b83df2815352bf5741844 (diff)
format code with cargo fmt
Diffstat (limited to 'examples')
-rw-r--r--examples/tokenize.rs12
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
}