From 12e32c622e1d9029ebc23b270dac870924f4fd15 Mon Sep 17 00:00:00 2001 From: Shimun Date: Tue, 26 Mar 2019 17:57:40 +0100 Subject: [PATCH] omit fmt call --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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