diff options
| author | Marvin Löbel <loebel.marvin@gmail.com> | 2013-03-21 23:02:27 +0100 |
|---|---|---|
| committer | Marvin Löbel <loebel.marvin@gmail.com> | 2013-03-21 23:06:05 +0100 |
| commit | 0a47cd5ef183d5a7e763484e211f4b3aed6d72de (patch) | |
| tree | 4f769f75ea9514f1012d4faa77782d1d4e45772c /src/libsyntax/parse/comments.rs | |
| parent | ee2f3d9673407db3ca5a0eb24e01ef52c7fc676c (diff) | |
| download | rust-0a47cd5ef183d5a7e763484e211f4b3aed6d72de.tar.gz rust-0a47cd5ef183d5a7e763484e211f4b3aed6d72de.zip | |
Un-renamed trim and substr functions.
Diffstat (limited to 'src/libsyntax/parse/comments.rs')
| -rw-r--r-- | src/libsyntax/parse/comments.rs | 10 |
1 files changed, 5 insertions, 5 deletions
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(); } |
