diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2013-06-08 22:04:46 +1000 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2013-06-09 02:22:23 +1000 |
| commit | 4b806b4d06a6b82771657f9b79728d3fba84ebed (patch) | |
| tree | 94d877c67441c10a55d343566664766ce0b82cbc /src/libsyntax/parse | |
| parent | 513d2292e5a743e630ceece06255528c1902ac01 (diff) | |
| download | rust-4b806b4d06a6b82771657f9b79728d3fba84ebed.tar.gz rust-4b806b4d06a6b82771657f9b79728d3fba84ebed.zip | |
std: remove each_char* fns and methods from str, replaced by iterators.
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/comments.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libsyntax/parse/comments.rs b/src/libsyntax/parse/comments.rs index 54fba29a19a..22b9e7d6c5e 100644 --- a/src/libsyntax/parse/comments.rs +++ b/src/libsyntax/parse/comments.rs @@ -21,6 +21,7 @@ use parse::token; use parse::token::{get_ident_interner}; use parse; +use core::iterator::IteratorUtil; use core::io; use core::str; use core::uint; @@ -78,7 +79,7 @@ pub fn strip_doc_comment_decoration(comment: &str) -> ~str { if line.trim().is_empty() { loop; } - for line.each_chari |j, c| { + for line.iter().enumerate().advance |(j, c)| { if j >= i { break; } @@ -91,7 +92,7 @@ pub fn strip_doc_comment_decoration(comment: &str) -> ~str { return do lines.map |line| { let mut chars = ~[]; - for str::each_char(*line) |c| { chars.push(c) } + for line.iter().advance |c| { chars.push(c) } if i > chars.len() { ~"" } else { |
