diff options
| author | Marvin Löbel <loebel.marvin@gmail.com> | 2013-11-23 11:18:51 +0100 |
|---|---|---|
| committer | Marvin Löbel <loebel.marvin@gmail.com> | 2013-11-26 10:02:26 +0100 |
| commit | 24b316a3b9567cb2cc2fb6644bd891dbf8855c18 (patch) | |
| tree | 567d9df8a078d09fc610ea3e0b301f5cb6fb63d8 /src/libsyntax/parse | |
| parent | b42c4388927db75f9a38edbeafbfe13775b1773d (diff) | |
| download | rust-24b316a3b9567cb2cc2fb6644bd891dbf8855c18.tar.gz rust-24b316a3b9567cb2cc2fb6644bd891dbf8855c18.zip | |
Removed unneccessary `_iter` suffixes from various APIs
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/comments.rs | 8 | ||||
| -rw-r--r-- | src/libsyntax/parse/lexer.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/libsyntax/parse/comments.rs b/src/libsyntax/parse/comments.rs index 4d8a6e08d0d..8defd8a7b6c 100644 --- a/src/libsyntax/parse/comments.rs +++ b/src/libsyntax/parse/comments.rs @@ -60,14 +60,14 @@ pub fn strip_doc_comment_decoration(comment: &str) -> ~str { let mut i = 0u; let mut j = lines.len(); // first line of all-stars should be omitted - if lines.len() > 0 && lines[0].iter().all(|c| c == '*') { + if lines.len() > 0 && lines[0].chars().all(|c| c == '*') { i += 1; } while i < j && lines[i].trim().is_empty() { i += 1; } // like the first, a last line of all stars should be omitted - if j > i && lines[j - 1].iter().skip(1).all(|c| c == '*') { + if j > i && lines[j - 1].chars().skip(1).all(|c| c == '*') { j -= 1; } while j > i && lines[j - 1].trim().is_empty() { @@ -82,7 +82,7 @@ pub fn strip_doc_comment_decoration(comment: &str) -> ~str { let mut can_trim = true; let mut first = true; for line in lines.iter() { - for (j, c) in line.iter().enumerate() { + for (j, c) in line.chars().enumerate() { if j > i || !"* \t".contains_char(c) { can_trim = false; break; @@ -124,7 +124,7 @@ pub fn strip_doc_comment_decoration(comment: &str) -> ~str { if comment.starts_with("/*") { let lines = comment.slice(3u, comment.len() - 2u) - .any_line_iter() + .lines_any() .map(|s| s.to_owned()) .collect::<~[~str]>(); diff --git a/src/libsyntax/parse/lexer.rs b/src/libsyntax/parse/lexer.rs index dbf485a50ce..6aa3962a0e7 100644 --- a/src/libsyntax/parse/lexer.rs +++ b/src/libsyntax/parse/lexer.rs @@ -318,7 +318,7 @@ fn consume_whitespace_and_comments(rdr: @mut StringReader) pub fn is_line_non_doc_comment(s: &str) -> bool { let s = s.trim_right(); - s.len() > 3 && s.iter().all(|ch| ch == '/') + s.len() > 3 && s.chars().all(|ch| ch == '/') } // PRECONDITION: rdr.curr is not whitespace @@ -379,7 +379,7 @@ fn consume_any_line_comment(rdr: @mut StringReader) pub fn is_block_non_doc_comment(s: &str) -> bool { assert!(s.len() >= 1u); - s.slice(1u, s.len() - 1u).iter().all(|ch| ch == '*') + s.slice(1u, s.len() - 1u).chars().all(|ch| ch == '*') } // might return a sugared-doc-attr diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 349e544004e..7de8e3087c8 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -4586,7 +4586,7 @@ impl Parser { self.bump(); let the_string = ident_to_str(&s); let mut abis = AbiSet::empty(); - for word in the_string.word_iter() { + for word in the_string.words() { match abi::lookup(word) { Some(abi) => { if abis.contains(abi) { |
