From 651e63cc5c2b90204e8cd9d263da567fe2a66fbf Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Fri, 14 Sep 2012 09:51:24 -0700 Subject: libcore: rename *flate_buf to *flate_bytes (#3444) --- src/libcore/flate.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/libcore') 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 +} -- cgit 1.4.1-3-g733a5