]> git.proxmox.com Git - rustc.git/blobdiff - src/vendor/flate2/examples/gzbuilder.rs
New upstream version 1.31.0+dfsg1
[rustc.git] / src / vendor / flate2 / examples / gzbuilder.rs
index dc8f74f3b8926e31312f6b3c302a5a1187c46566..4b3c9c59709f463b1b7f450071a53cf6a0fe30be 100644 (file)
@@ -15,10 +15,10 @@ fn main() {
 fn sample_builder() -> Result<(), io::Error> {
     let f = File::create("examples/hello_world.gz")?;
     let mut gz = GzBuilder::new()
-                 .filename("hello_world.txt")
-                 .comment("test file, please delete")
-                 .write(f, Compression::default());
-    gz.write(b"hello world")?;
+        .filename("hello_world.txt")
+        .comment("test file, please delete")
+        .write(f, Compression::default());
+    gz.write_all(b"hello world")?;
     gz.finish()?;
     Ok(())
 }