diff --git a/crates/core/src/document/html/css.rs b/crates/core/src/document/html/css.rs
index 142d5bfd..d257e618 100644
--- a/crates/core/src/document/html/css.rs
+++ b/crates/core/src/document/html/css.rs
@@ -1,13 +1,13 @@
use fxhash::FxHashSet;
use super::style::StyleSheet;
-#[derive(Debug, Clone)]
+#[derive(Debug, Clone, Default)]
pub struct Selector {
pub simple_selectors: Vec,
pub combinators: Vec,
}
-#[derive(Debug, Clone)]
+#[derive(Debug, Clone, Default)]
pub struct SimpleSelector {
pub tag_name: Option,
pub classes: FxHashSet,
@@ -53,27 +53,6 @@ pub enum Combinator {
SubsequentSibling,
}
-impl Default for Selector {
- fn default() -> Self {
- Selector {
- simple_selectors: Vec::new(),
- combinators: Vec::new(),
- }
- }
-}
-
-impl Default for SimpleSelector {
- fn default() -> Self {
- SimpleSelector {
- tag_name: None,
- classes: FxHashSet::default(),
- pseudo_classes: Vec::new(),
- attributes: Vec::new(),
- id: None,
- }
- }
-}
-
pub type Specificity = [usize; 3];
impl Selector {
@@ -90,23 +69,13 @@ impl Selector {
}
}
-#[derive(Debug, Clone)]
+#[derive(Debug, Clone, Default)]
pub struct Declaration {
pub name: String,
pub value: String,
pub important: bool,
}
-impl Default for Declaration {
- fn default() -> Declaration {
- Declaration {
- name: String::default(),
- value: String::default(),
- important: false,
- }
- }
-}
-
#[derive(Debug, Clone)]
pub struct Rule {
pub selector: Selector,
diff --git a/crates/core/src/document/html/layout.rs b/crates/core/src/document/html/layout.rs
index 59c9aee1..c1a67e45 100644
--- a/crates/core/src/document/html/layout.rs
+++ b/crates/core/src/document/html/layout.rs
@@ -19,7 +19,7 @@ pub struct RootData {
pub rect: Rectangle,
}
-#[derive(Debug, Clone)]
+#[derive(Debug, Clone, Default)]
pub struct DrawState {
pub position: Point,
pub floats: FxHashMap>,
@@ -30,19 +30,6 @@ pub struct DrawState {
pub center_table: bool,
}
-impl Default for DrawState {
- fn default() -> Self {
- DrawState {
- position: Point::default(),
- floats: FxHashMap::default(),
- prefix: None,
- min_column_widths: Vec::new(),
- max_column_widths: Vec::new(),
- column_widths: Vec::new(),
- center_table: false,
- }
- }
-}
#[derive(Debug, Clone)]
pub struct StyleData {
@@ -114,13 +101,13 @@ pub struct ChildArtifact {
pub rects: Vec