Skip to content

Commit

Permalink
derive default
Browse files Browse the repository at this point in the history
  • Loading branch information
Orion Gonzalez committed Jul 18, 2024
1 parent 28e1ec0 commit 8684b40
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ use html5ever::{LocalName, Namespace, Prefix};
use indexmap::{map::Entry, IndexMap};

/// Convenience wrapper around a indexmap that adds method for attributes in the null namespace.
#[derive(Debug, PartialEq, Clone)]
#[derive(Debug, PartialEq, Clone, Default)]
pub struct Attributes {
/// A map of attributes whose name can have namespaces.
pub map: IndexMap<ExpandedName, Attribute>,
}

/// <https://www.w3.org/TR/REC-xml-names/#dt-expname>
#[derive(Debug, PartialEq, Eq, Hash, Clone, PartialOrd, Ord)]
#[derive(Debug, PartialEq, Eq, Hash, Clone, PartialOrd, Ord, Default)]
pub struct ExpandedName {
/// Namespace URL
pub ns: Namespace,
Expand All @@ -28,7 +28,7 @@ impl ExpandedName {
}

/// The non-identifying parts of an attribute
#[derive(Debug, PartialEq, Clone)]
#[derive(Debug, PartialEq, Clone, Default)]
pub struct Attribute {
/// The namespace prefix, if any
pub prefix: Option<Prefix>,
Expand Down

0 comments on commit 8684b40

Please sign in to comment.