about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-09-26 05:36:01 -0700
committerbors <bors@rust-lang.org>2013-09-26 05:36:01 -0700
commit0022f2b20418a35737cd944487b1b272f68de4f2 (patch)
tree89fafcba5aee65fce13fcf4cc1b625090d6780ed
parent930f7790fbad87f1ddf26a34b089622bc8a742c8 (diff)
parent23a067dc2ce107054e34fb2d2ceda1549aa35245 (diff)
auto merge of #9500 : fhahn/rust/rename-str_from_bytes-fix, r=alexcrichton
As @Dretch pointed out [here](https://github.com/fhahn/rust/commit/de39874801761197bf10bf8d04bde1aa2bd82e15#L2L526) , from_bytes was accidentally renamed to from_utf8. 
-rw-r--r--src/libextra/bitv.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libextra/bitv.rs b/src/libextra/bitv.rs
index 780527e4532..1ff54772f39 100644
--- a/src/libextra/bitv.rs
+++ b/src/libextra/bitv.rs
@@ -523,7 +523,7 @@ impl Bitv {
  * with the most significant bits of each byte coming first. Each
  * bit becomes true if equal to 1 or false if equal to 0.
  */
-pub fn from_utf8(bytes: &[u8]) -> Bitv {
+pub fn from_bytes(bytes: &[u8]) -> Bitv {
     from_fn(bytes.len() * 8, |i| {
         let b = bytes[i / 8] as uint;
         let offset = i % 8;
@@ -1275,8 +1275,8 @@ mod tests {
     }
 
     #[test]
-    fn test_from_utf8() {
-        let bitv = from_utf8([0b10110110, 0b00000000, 0b11111111]);
+    fn test_from_bytes() {
+        let bitv = from_bytes([0b10110110, 0b00000000, 0b11111111]);
         let str = ~"10110110" + "00000000" + "11111111";
         assert_eq!(bitv.to_str(), str);
     }
@@ -1302,7 +1302,7 @@ mod tests {
     #[test]
     fn test_to_bools() {
         let bools = ~[false, false, true, false, false, true, true, false];
-        assert_eq!(from_utf8([0b00100110]).to_bools(), bools);
+        assert_eq!(from_bytes([0b00100110]).to_bools(), bools);
     }
 
     #[test]