diff options
-rw-r--r-- | src/emitter.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/emitter.rs b/src/emitter.rs index 1ab0e60..9781002 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -275,13 +275,15 @@ impl<R, S: Span<R>> Emitter<R> for DefaultEmitter<R, S> { fn init_start_tag(&mut self, reader: &R) { self.current_token = Some(Token::StartTag(StartTag { name_span: S::from_reader(reader), - ..Default::default() + self_closing: false, + name: String::new(), + attributes: Default::default(), })); } fn init_end_tag(&mut self, reader: &R) { self.current_token = Some(Token::EndTag(EndTag { name_span: S::from_reader(reader), - ..Default::default() + name: String::new(), })); self.seen_attributes.clear(); } @@ -467,7 +469,7 @@ impl<R, S: Span<R>> Emitter<R> for DefaultEmitter<R, S> { } /// An HTML start tag, such as `<p>` or `<a>`. -#[derive(Debug, Default, Eq, PartialEq)] +#[derive(Debug, Eq, PartialEq)] pub struct StartTag<S> { /// Whether this tag is self-closing. If it is self-closing, no following [`EndTag`] should be /// expected. @@ -500,7 +502,7 @@ pub struct Attribute<S> { } /// A HTML end/close tag, such as `</p>` or `</a>`. -#[derive(Debug, Default, Eq, PartialEq)] +#[derive(Debug, Eq, PartialEq)] pub struct EndTag<S> { /// The ending tag's name, such as `"p"` or `"a"`. pub name: String, |