diff options
author | Markus Unterwaditzer <markus-honeypot@unterwaditzer.net> | 2021-12-03 16:05:44 +0100 |
---|---|---|
committer | Markus Unterwaditzer <markus-honeypot@unterwaditzer.net> | 2021-12-03 16:05:44 +0100 |
commit | 710de8ae37c1199ce65430ceed00cbc1ed61d81a (patch) | |
tree | 9415bca32aa76d6317d0237d7f0fcbb9538de984 /src | |
parent | c9c8fcf4daa594c7b3ffe08a64f563f152c22f29 (diff) |
fix new clippy
Diffstat (limited to 'src')
-rw-r--r-- | src/emitter.rs | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/emitter.rs b/src/emitter.rs index 5bf1e0a..8c8976d 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -171,6 +171,7 @@ pub trait Emitter { } /// The default implementation of [`crate::Emitter`], used to produce ("emit") tokens. +#[derive(Default)] pub struct DefaultEmitter { current_characters: String, current_token: Option<Token>, @@ -180,19 +181,6 @@ pub struct DefaultEmitter { emitted_tokens: VecDeque<Token>, } -impl Default for DefaultEmitter { - fn default() -> Self { - DefaultEmitter { - current_characters: String::new(), - current_token: None, - last_start_tag: String::new(), - current_attribute: None, - seen_attributes: BTreeSet::new(), - emitted_tokens: VecDeque::new(), - } - } -} - impl DefaultEmitter { fn emit_token(&mut self, token: Token) { self.flush_current_characters(); |