diff options
author | Martin Fischer <martin@push-f.com> | 2023-08-12 01:48:34 +0200 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2023-08-19 06:41:55 +0200 |
commit | d789a923f26bb2cf6fad295fa97f4303ea9a67a3 (patch) | |
tree | e30ad8b2ae4858b7a383b6bf47b10aff2d4dab98 /src/emitter.rs | |
parent | 681404e5036841ec45356f56f77cc5377f3640d9 (diff) |
break!: remove Default impls for StartTag and EndTag
Diffstat (limited to 'src/emitter.rs')
-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, |