diff --git a/src/main.rs b/src/main.rs index 4716109..15594fa 100644 --- a/src/main.rs +++ b/src/main.rs @@ -77,7 +77,7 @@ fn main() -> Result<(), Box> { // Let's get the actual text in this text node. A text node wraps around // a RefCell, so we need to call borrow() to get a &str out. //let text = text_node.as_text().unwrap().borrow(); - write!(out, "{}", serialize_node(as_node)?)?; + out.write_all(serialize_node(as_node)?.as_bytes())?; /*if let Some(child) = as_node.first_child() { //TODO: Convert Nodes to String, as this only works for Nodes containing plain text