Rename str::unsafe to str::raw
This commit is contained in:
parent
59c3c6c147
commit
308ca06012
10 changed files with 50 additions and 50 deletions
|
|
@ -59,7 +59,7 @@ fn make_repeat_fasta(wr: io::Writer, id: ~str, desc: ~str, s: ~str, n: int) unsa
|
|||
let mut op: ~str = ~"";
|
||||
let sl: uint = str::len(s);
|
||||
for uint::range(0u, n as uint) |i| {
|
||||
str::unsafe::push_byte(op, s[i % sl]);
|
||||
str::raw::push_byte(op, s[i % sl]);
|
||||
if str::len(op) >= LINE_LENGTH() {
|
||||
wr.write_line(op);
|
||||
op = ~"";
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ fn sort_and_fmt(mm: HashMap<~[u8], uint>, total: uint) -> ~str {
|
|||
|
||||
pairs_sorted.each(fn&(kv: (~[u8], float)) -> bool unsafe {
|
||||
let (k,v) = kv;
|
||||
buffer += (fmt!("%s %0.3f\n", str::to_upper(str::unsafe::from_bytes(k)), v));
|
||||
buffer += (fmt!("%s %0.3f\n", str::to_upper(str::raw::from_bytes(k)), v));
|
||||
return true;
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ fn sort_and_fmt(mm: HashMap<~[u8], uint>, total: uint) -> ~str {
|
|||
|
||||
pairs_sorted.each(fn&(kv: (~[u8], float)) -> bool unsafe {
|
||||
let (k,v) = kv;
|
||||
buffer += (fmt!("%s %0.3f\n", str::to_upper(str::unsafe::from_bytes(k)), v));
|
||||
buffer += (fmt!("%s %0.3f\n", str::to_upper(str::raw::from_bytes(k)), v));
|
||||
return true;
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue