Convert std::bitv to istrs. Issue #855
This commit is contained in:
parent
805e3098c5
commit
2c8a93aa3b
@ -151,9 +151,11 @@ fn to_vec(v: &t) -> [uint] {
|
||||
ret vec::init_fn::<uint>(sub, v.nbits);
|
||||
}
|
||||
|
||||
fn to_str(v: &t) -> str {
|
||||
let rs = "";
|
||||
for i: uint in to_vec(v) { if i == 1u { rs += "1"; } else { rs += "0"; } }
|
||||
fn to_str(v: &t) -> istr {
|
||||
let rs = ~"";
|
||||
for i: uint in to_vec(v) {
|
||||
if i == 1u { rs += ~"1"; } else { rs += ~"0"; }
|
||||
}
|
||||
ret rs;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user