aboutsummaryrefslogtreecommitdiffstats
path: root/src/events
diff options
context:
space:
mode:
authorEdward Barnard2018-07-16 22:55:45 +0100
committerEdward Barnard2018-07-16 22:55:45 +0100
commit58141392dd19d9f3f21df7cb812beb74209c3ba3 (patch)
tree257f3e2ae51bc7a33dbdf60937f3db53a7d3a492 /src/events
parent54ddc49599d377c59676ff4db4b7b9da3fe1fe52 (diff)
downloadrust-plist-58141392dd19d9f3f21df7cb812beb74209c3ba3.tar.bz2
Use `write_all` instead of `write` to output xml prologue and trailer.
Diffstat (limited to 'src/events')
-rw-r--r--src/events/xml_writer.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/events/xml_writer.rs b/src/events/xml_writer.rs
index 08f399f..a2df5bf 100644
--- a/src/events/xml_writer.rs
+++ b/src/events/xml_writer.rs
@@ -87,7 +87,7 @@ impl<W: Write> XmlWriter<W> {
if self.stack.len() == 1 {
// We didn't tell the xml_writer about the <plist> tag so we'll skip telling it
// about the </plist> tag as well.
- self.xml_writer.inner_mut().write(b"\n</plist>")?;
+ self.xml_writer.inner_mut().write_all(b"\n</plist>")?;
if let Some(Element::Root) = self.stack.pop() {
} else {
return Err(Error::InvalidData);
@@ -130,7 +130,7 @@ impl<W: Write> Writer for XmlWriter<W> {
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
"#;
- self.xml_writer.inner_mut().write(prologue.as_bytes())?;
+ self.xml_writer.inner_mut().write_all(prologue.as_bytes())?;
self.stack.push(Element::Root);
}