Skip to content

Commit 7faf317

Browse files
committed
cargo fmt
1 parent 7d39a91 commit 7faf317

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

src/stream/gzip.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,8 @@ impl<S: Stream<Item = Result<Bytes>>> Stream for DecompressedGzipStream<S> {
178178

179179
// reserve the last 8 bytes for when the footer is reached
180180
let (prior_in, prior_out) = (this.decompress.total_in(), this.decompress.total_out());
181-
this.decompress.decompress(
182-
this.input_buffer,
183-
this.output_buffer,
184-
flush,
185-
)?;
181+
this.decompress
182+
.decompress(this.input_buffer, this.output_buffer, flush)?;
186183
let input = this.decompress.total_in() - prior_in;
187184
let output = this.decompress.total_out() - prior_out;
188185

tests/gzip.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,17 @@ fn decompressed_gzip_stream_2() {
5252
let data: Vec<_> = block_on(decompressed.collect());
5353
let data: io::Result<Vec<_>> = data.into_iter().collect();
5454
let data: Vec<u8> = data.unwrap().into_iter().flatten().collect();
55-
assert_eq!(data, vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]);
55+
assert_eq!(
56+
data,
57+
vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
58+
);
5659
}
5760

5861
#[test]
5962
fn decompressed_gzip_stream_3() {
6063
use async_compression::stream::gzip;
6164

62-
let stream = stream::iter(vec![
63-
Bytes::from_static(&[]),
64-
]);
65+
let stream = stream::iter(vec![Bytes::from_static(&[])]);
6566
let compressed = gzip::GzipStream::new(stream.map(Ok), gzip::Compression::default());
6667
let decompressed = gzip::DecompressedGzipStream::new(compressed);
6768
let data: Vec<_> = block_on(decompressed.collect());

0 commit comments

Comments
 (0)