Skip to content

Commit

Permalink
fix: text can be null on constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
nephi-dev committed May 1, 2023
1 parent 869af33 commit 8af1e89
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,11 @@ impl Node {
) -> PyResult<Self> {
let _attrs = attrs.unwrap_or(HashMap::new());
let _children = children.unwrap_or(Vec::new());
let _text = text.unwrap_or(String::new());
Ok(Node {
name,
attrs: _attrs,
children: _children,
text: Some(_text),
text,
})
}
fn __to_string(&self, spacing: Option<u8>) -> String {
Expand Down

0 comments on commit 8af1e89

Please sign in to comment.