diff options
Diffstat (limited to 'src/token.rs')
| -rw-r--r-- | src/token.rs | 12 | 
1 files changed, 6 insertions, 6 deletions
| diff --git a/src/token.rs b/src/token.rs index 4f3c0ce..45c8123 100644 --- a/src/token.rs +++ b/src/token.rs @@ -5,7 +5,7 @@ use std::iter::FromIterator;  use std::ops::Index;  /// A type for the tokens emitted by a WHATWG-compliant HTML tokenizer. -#[derive(Debug, Eq, PartialEq)] +#[derive(Clone, Debug, Eq, PartialEq)]  pub enum Token {      /// A literal character, a resolved character reference,      /// or part of a resolved character reference (since some @@ -24,7 +24,7 @@ pub enum Token {  }  /// An HTML start tag, such as `<p>` or `<a>`. -#[derive(Debug, Eq, PartialEq)] +#[derive(Clone, Debug, Eq, PartialEq)]  pub struct StartTag {      /// Whether this tag is self-closing. If it is self-closing, no following [`EndTag`] should be      /// expected. @@ -41,7 +41,7 @@ pub struct StartTag {  }  /// An HTML end/close tag, such as `</p>` or `</a>`. -#[derive(Debug, Eq, PartialEq)] +#[derive(Clone, Debug, Eq, PartialEq)]  pub struct EndTag {      /// The tag name.      /// Uppercase ASCII characters (A-Z) have been converted to lowercase. @@ -54,7 +54,7 @@ pub struct EndTag {  /// * `<!DOCTYPE {name} PUBLIC '{public_id}'>`  /// * `<!DOCTYPE {name} SYSTEM '{system_id}'>`  /// * `<!DOCTYPE {name} PUBLIC '{public_id}' '{system_id}'>` -#[derive(Debug, Eq, PartialEq)] +#[derive(Clone, Debug, Eq, PartialEq)]  pub struct Doctype {      /// The [force-quirks flag].      /// @@ -86,14 +86,14 @@ pub struct Doctype {  ///     .collect();  /// assert_eq!(&attrs["href"], "http://example.com");  /// ``` -#[derive(Debug, Default, PartialEq, Eq)] +#[derive(Clone, Debug, Default, PartialEq, Eq)]  pub struct AttributeMap {      pub(crate) inner: BTreeMap<String, AttrInternal>,  }  /// The value type internally used by the [`AttributeMap`].  /// Not part of the public API. -#[derive(Default, Debug, Eq)] +#[derive(Clone, Default, Debug, Eq)]  pub(crate) struct AttrInternal {      pub value: String,      pub trace_idx: Option<AttributeTraceIdx>, | 
