Skip to content

Commit 1215b83

Browse files
committed
Formatting libflate
1 parent 6c16ecb commit 1215b83

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/libflate/lib.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030
#![feature(unique)]
3131
#![cfg_attr(test, feature(rustc_private, rand, collections))]
3232

33-
#[cfg(test)] #[macro_use] extern crate log;
33+
#[cfg(test)]
34+
#[macro_use]
35+
extern crate log;
3436

3537
extern crate libc;
3638

@@ -123,7 +125,7 @@ pub fn deflate_bytes_zlib(bytes: &[u8]) -> Bytes {
123125
deflate_bytes_internal(bytes, LZ_NORM | TDEFL_WRITE_ZLIB_HEADER)
124126
}
125127

126-
fn inflate_bytes_internal(bytes: &[u8], flags: c_int) -> Result<Bytes,Error> {
128+
fn inflate_bytes_internal(bytes: &[u8], flags: c_int) -> Result<Bytes, Error> {
127129
unsafe {
128130
let mut outsz: size_t = 0;
129131
let res = tinfl_decompress_mem_to_heap(bytes.as_ptr() as *const _,
@@ -142,12 +144,12 @@ fn inflate_bytes_internal(bytes: &[u8], flags: c_int) -> Result<Bytes,Error> {
142144
}
143145

144146
/// Decompress a buffer, without parsing any sort of header on the input.
145-
pub fn inflate_bytes(bytes: &[u8]) -> Result<Bytes,Error> {
147+
pub fn inflate_bytes(bytes: &[u8]) -> Result<Bytes, Error> {
146148
inflate_bytes_internal(bytes, 0)
147149
}
148150

149151
/// Decompress a buffer that starts with a zlib header.
150-
pub fn inflate_bytes_zlib(bytes: &[u8]) -> Result<Bytes,Error> {
152+
pub fn inflate_bytes_zlib(bytes: &[u8]) -> Result<Bytes, Error> {
151153
inflate_bytes_internal(bytes, TINFL_FLAG_PARSE_ZLIB_HEADER)
152154
}
153155

0 commit comments

Comments
 (0)