libcore: De-mode str

This commit is contained in:
Patrick Walton
2012-09-21 18:36:32 -07:00
parent 49af969e2c
commit d48396c986
19 changed files with 182 additions and 159 deletions

View File

@@ -117,7 +117,7 @@ fn strip_doc_comment_decoration(comment: ~str) -> ~str {
fn read_to_eol(rdr: string_reader) -> ~str {
let mut val = ~"";
while rdr.curr != '\n' && !is_eof(rdr) {
str::push_char(val, rdr.curr);
str::push_char(&mut val, rdr.curr);
bump(rdr);
}
if rdr.curr == '\n' { bump(rdr); }
@@ -242,7 +242,7 @@ fn read_block_comment(rdr: string_reader, code_to_the_left: bool,
curr_line = ~"";
bump(rdr);
} else {
str::push_char(curr_line, rdr.curr);
str::push_char(&mut curr_line, rdr.curr);
if rdr.curr == '/' && nextch(rdr) == '*' {
bump(rdr);
bump(rdr);