diff options
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(); |