Skip to content

Commit 3fb9d32

Browse files
kud1inghuonw
authored andcommitted
---
yaml --- r: 81904 b: refs/heads/master c: d798e00 h: refs/heads/master v: v3
1 parent d1a2dd3 commit 3fb9d32

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 0022f2b20418a35737cd944487b1b272f68de4f2
2+
refs/heads/master: d798e00337e72d5036a5c3cfd463c6ebb30d83d2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6c08cc2db4f98e9f07ae7d50338396c4123c2f0a
55
refs/heads/try: 70152ff55722878cde684ee6462c14c65f2c4729

trunk/src/libextra/bitv.rs

Lines changed: 4 additions & 4 deletions
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_bytes(bytes: &[u8]) -> Bitv {
526+
pub fn from_utf8(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_bytes() {
1279-
let bitv = from_bytes([0b10110110, 0b00000000, 0b11111111]);
1278+
fn test_from_utf8() {
1279+
let bitv = from_utf8([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_bytes([0b00100110]).to_bools(), bools);
1305+
assert_eq!(from_utf8([0b00100110]).to_bools(), bools);
13061306
}
13071307
13081308
#[test]

trunk/src/libextra/getopts.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010

1111
//! Simple getopt alternative.
1212
//!
13-
//! Construct a vector of options, either by using reqopt, optopt, and optflag
14-
//! or by building them from components yourself, and pass them to getopts,
15-
//! along with a vector of actual arguments (not including argv[0]). You'll
13+
//! Construct a vector of options, either by using `reqopt`, `optopt`, and `optflag`
14+
//! or by building them from components yourself, and pass them to `getopts`,
15+
//! along with a vector of actual arguments (not including `argv[0]`). You'll
1616
//! either get a failure code back, or a match. You'll have to verify whether
17-
//! the amount of 'free' arguments in the match is what you expect. Use opt_*
17+
//! the amount of 'free' arguments in the match is what you expect. Use `opt_*`
1818
//! accessors to get argument values out of the matches object.
1919
//!
2020
//! Single-character options are expected to appear on the command line with a
@@ -27,7 +27,7 @@
2727
//!
2828
//! The following example shows simple command line parsing for an application
2929
//! that requires an input file to be specified, accepts an optional output
30-
//! file name following -o, and accepts both -h and --help as optional flags.
30+
//! file name following `-o`, and accepts both `-h` and `--help` as optional flags.
3131
//!
3232
//! ~~~{.rust}
3333
//! exter mod extra;

0 commit comments

Comments
 (0)