From 0a47cd5ef183d5a7e763484e211f4b3aed6d72de Mon Sep 17 00:00:00 2001 From: Marvin Löbel Date: Thu, 21 Mar 2013 23:02:27 +0100 Subject: Un-renamed trim and substr functions. --- src/libsyntax/parse/comments.rs | 10 +++++----- src/libsyntax/parse/lexer.rs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/comments.rs b/src/libsyntax/parse/comments.rs index 01a4265ca4d..6ebaa42357e 100644 --- a/src/libsyntax/parse/comments.rs +++ b/src/libsyntax/parse/comments.rs @@ -70,10 +70,10 @@ pub fn strip_doc_comment_decoration(comment: &str) -> ~str { /// remove whitespace-only lines from the start/end of lines fn vertical_trim(lines: ~[~str]) -> ~[~str] { let mut i = 0u, j = lines.len(); - while i < j && lines[i].trim_DBGBRWD().is_empty() { + while i < j && lines[i].trim().is_empty() { i += 1u; } - while j > i && lines[j - 1u].trim_DBGBRWD().is_empty() { + while j > i && lines[j - 1u].trim().is_empty() { j -= 1u; } return lines.slice(i, j).to_owned(); @@ -84,7 +84,7 @@ pub fn strip_doc_comment_decoration(comment: &str) -> ~str { let mut i = max.get_or_default(uint::max_value); for lines.each |line| { - if line.trim_DBGBRWD().is_empty() { + if line.trim().is_empty() { loop; } for line.each_chari |j, c| { @@ -110,8 +110,8 @@ pub fn strip_doc_comment_decoration(comment: &str) -> ~str { if comment.starts_with(~"//") { // FIXME #5475: - // return comment.slice(3u, comment.len()).trim_DBGBRWD().to_owned(); - let r = comment.slice(3u, comment.len()); return r.trim_DBGBRWD().to_owned(); + // return comment.slice(3u, comment.len()).trim().to_owned(); + let r = comment.slice(3u, comment.len()); return r.trim().to_owned(); } diff --git a/src/libsyntax/parse/lexer.rs b/src/libsyntax/parse/lexer.rs index 80be23d40f7..6cb4065935c 100644 --- a/src/libsyntax/parse/lexer.rs +++ b/src/libsyntax/parse/lexer.rs @@ -262,7 +262,7 @@ fn consume_whitespace_and_comments(rdr: @mut StringReader) } pub pure fn is_line_non_doc_comment(s: &str) -> bool { - s.trim_right_DBGBRWD().all(|ch| ch == '/') + s.trim_right().all(|ch| ch == '/') } // PRECONDITION: rdr.curr is not whitespace -- cgit 1.4.1-3-g733a5