diff options
| author | Erick Tryzelaar <erick.tryzelaar@gmail.com> | 2012-09-14 09:51:24 -0700 |
|---|---|---|
| committer | Erick Tryzelaar <erick.tryzelaar@gmail.com> | 2012-09-15 13:38:41 -0700 |
| commit | 651e63cc5c2b90204e8cd9d263da567fe2a66fbf (patch) | |
| tree | 84e68f80d8141a0468304062939071908a7c414c /src/libcore | |
| parent | f1f57392564a89155b404a8d326fac9d6923626b (diff) | |
| download | rust-651e63cc5c2b90204e8cd9d263da567fe2a66fbf.tar.gz rust-651e63cc5c2b90204e8cd9d263da567fe2a66fbf.zip | |
libcore: rename *flate_buf to *flate_bytes (#3444)
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/flate.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libcore/flate.rs b/src/libcore/flate.rs index 836ffabd0fc..234f2730233 100644 --- a/src/libcore/flate.rs +++ b/src/libcore/flate.rs @@ -18,8 +18,8 @@ const lz_fast : c_int = 0x1; // LZ with only one probe const lz_norm : c_int = 0x80; // LZ with 128 probes, "normal" const lz_best : c_int = 0xfff; // LZ with 4095 probes, "best" -fn deflate_buf(buf: &[const u8]) -> ~[u8] { - do vec::as_const_buf(buf) |b, len| { +fn deflate_bytes(bytes: &[const u8]) -> ~[u8] { + do vec::as_const_buf(bytes) |b, len| { unsafe { let mut outsz : size_t = 0; let res = @@ -36,8 +36,8 @@ fn deflate_buf(buf: &[const u8]) -> ~[u8] { } } -fn inflate_buf(buf: &[const u8]) -> ~[u8] { - do vec::as_const_buf(buf) |b, len| { +fn inflate_bytes(bytes: &[const u8]) -> ~[u8] { + do vec::as_const_buf(bytes) |b, len| { unsafe { let mut outsz : size_t = 0; let res = @@ -69,11 +69,11 @@ fn test_flate_round_trip() { } debug!("de/inflate of %u bytes of random word-sequences", in.len()); - let cmp = flate::deflate_buf(in); - let out = flate::inflate_buf(cmp); + let cmp = flate::deflate_bytes(in); + let out = flate::inflate_bytes(cmp); debug!("%u bytes deflated to %u (%.1f%% size)", in.len(), cmp.len(), 100.0 * ((cmp.len() as float) / (in.len() as float))); assert(in == out); } -} \ No newline at end of file +} |
