Skip to content

Commit 1fb943a

Browse files
committed
cargo fmt
1 parent f8c910f commit 1fb943a

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

src/zio.rs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ use std::io;
22
use std::io::prelude::*;
33
use std::mem;
44

5-
use crate::{Compress, CompressError, Decompress, DecompressError, FlushCompress, FlushDecompress, Status};
5+
use crate::{
6+
Compress, CompressError, Decompress, DecompressError, FlushCompress, FlushDecompress, Status,
7+
};
68

79
#[derive(Debug)]
810
pub struct Writer<W: Write, D: Ops> {
@@ -173,7 +175,9 @@ impl<W: Write, D: Ops> Writer<W, D> {
173175
self.dump()?;
174176

175177
let before = self.data.total_out();
176-
self.data.run_vec(&[], &mut self.buf, Flush::finish()).map_err(Into::into)?;
178+
self.data
179+
.run_vec(&[], &mut self.buf, Flush::finish())
180+
.map_err(Into::into)?;
177181
if before == self.data.total_out() {
178182
return Ok(());
179183
}
@@ -255,10 +259,10 @@ impl<W: Write, D: Ops> Write for Writer<W, D> {
255259
self.write_with_status(buf).map(|res| res.0)
256260
}
257261

258-
fn flush(&mut self) -> io::Result<()>
259-
{
262+
fn flush(&mut self) -> io::Result<()> {
260263
self.data
261-
.run_vec(&[], &mut self.buf, Flush::sync()).map_err(Into::into)?;
264+
.run_vec(&[], &mut self.buf, Flush::sync())
265+
.map_err(Into::into)?;
262266

263267
// Unfortunately miniz doesn't actually tell us when we're done with
264268
// pulling out all the data from the internal stream. To remedy this we
@@ -269,7 +273,8 @@ impl<W: Write, D: Ops> Write for Writer<W, D> {
269273
self.dump()?;
270274
let before = self.data.total_out();
271275
self.data
272-
.run_vec(&[], &mut self.buf, Flush::none()).map_err(Into::into)?;
276+
.run_vec(&[], &mut self.buf, Flush::none())
277+
.map_err(Into::into)?;
273278
if before == self.data.total_out() {
274279
break;
275280
}

0 commit comments

Comments
 (0)