Skip to content

Commit 23a067d

Browse files
committed
Rename from_utf8 to from_bytes again
1 parent 0186473 commit 23a067d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libextra/bitv.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ impl Bitv {
523523
* with the most significant bits of each byte coming first. Each
524524
* bit becomes true if equal to 1 or false if equal to 0.
525525
*/
526-
pub fn from_utf8(bytes: &[u8]) -> Bitv {
526+
pub fn from_bytes(bytes: &[u8]) -> Bitv {
527527
from_fn(bytes.len() * 8, |i| {
528528
let b = bytes[i / 8] as uint;
529529
let offset = i % 8;
@@ -1275,8 +1275,8 @@ mod tests {
12751275
}
12761276
12771277
#[test]
1278-
fn test_from_utf8() {
1279-
let bitv = from_utf8([0b10110110, 0b00000000, 0b11111111]);
1278+
fn test_from_bytes() {
1279+
let bitv = from_bytes([0b10110110, 0b00000000, 0b11111111]);
12801280
let str = ~"10110110" + "00000000" + "11111111";
12811281
assert_eq!(bitv.to_str(), str);
12821282
}
@@ -1302,7 +1302,7 @@ mod tests {
13021302
#[test]
13031303
fn test_to_bools() {
13041304
let bools = ~[false, false, true, false, false, true, true, false];
1305-
assert_eq!(from_utf8([0b00100110]).to_bools(), bools);
1305+
assert_eq!(from_bytes([0b00100110]).to_bools(), bools);
13061306
}
13071307
13081308
#[test]

0 commit comments

Comments
 (0)