diff options
Diffstat (limited to 'src/libsyntax/parse/comments.rs')
| -rw-r--r-- | src/libsyntax/parse/comments.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/libsyntax/parse/comments.rs b/src/libsyntax/parse/comments.rs index 8defd8a7b6c..d8f2d8a5380 100644 --- a/src/libsyntax/parse/comments.rs +++ b/src/libsyntax/parse/comments.rs @@ -106,9 +106,7 @@ pub fn strip_doc_comment_decoration(comment: &str) -> ~str { } if can_trim { - do lines.map |line| { - line.slice(i + 1, line.len()).to_owned() - } + lines.map(|line| line.slice(i + 1, line.len()).to_owned()) } else { lines } @@ -377,10 +375,10 @@ pub fn gather_comments_and_literals(span_diagnostic: //discard, and look ahead; we're working with internal state let TokenAndSpan {tok: tok, sp: sp} = rdr.peek(); if token::is_lit(&tok) { - do with_str_from(rdr, bstart) |s| { + with_str_from(rdr, bstart, |s| { debug!("tok lit: {}", s); literals.push(lit {lit: s.to_owned(), pos: sp.lo}); - } + }) } else { debug!("tok: {}", token::to_str(get_ident_interner(), &tok)); } |
