We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Node
Default
NULL
EMPTY
1 parent 1c423d8 commit 2e14fd4Copy full SHA for 2e14fd4
2 files changed
Cargo.toml
@@ -13,4 +13,4 @@ resolver = "2"
13
license = "MIT"
14
readme = "README.md"
15
repository = "https://github.com/vidhanio/html-node"
16
- version = "0.1.18"
+ version = "0.2.0"
html-node-core/src/lib.rs
@@ -75,7 +75,7 @@ pub enum Node {
75
76
impl Node {
77
/// A [`Node::Fragment`] with no children.
78
- pub const NULL: Self = Self::Fragment(Fragment {
+ pub const EMPTY: Self = Self::Fragment(Fragment {
79
children: Vec::new(),
80
});
81
@@ -111,6 +111,12 @@ impl Display for Node {
111
}
112
113
114
+impl Default for Node {
115
+ fn default() -> Self {
116
+ Self::EMPTY
117
+ }
118
+}
119
+
120
/// A comment.
121
///
122
/// ```html
0 commit comments