From c8dd2d066d7b25246d2b940b7c161b8b67608b74 Mon Sep 17 00:00:00 2001 From: Marvin Löbel Date: Thu, 19 Feb 2015 14:36:58 +0100 Subject: Addressed PR comments --- src/libsyntax/parse/lexer/comments.rs | 4 ++-- src/libsyntax/parse/parser.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/lexer/comments.rs b/src/libsyntax/parse/lexer/comments.rs index 1f06db60027..7a5d75581a5 100644 --- a/src/libsyntax/parse/lexer/comments.rs +++ b/src/libsyntax/parse/lexer/comments.rs @@ -92,7 +92,7 @@ pub fn strip_doc_comment_decoration(comment: &str) -> String { let mut first = true; for line in &lines { for (j, c) in line.chars().enumerate() { - if j > i || !"* \t".contains_char(c) { + if j > i || !"* \t".contains(c) { can_trim = false; break; } @@ -264,7 +264,7 @@ fn read_block_comment(rdr: &mut StringReader, if is_block_doc_comment(&curr_line[..]) { return } - assert!(!curr_line.contains_char('\n')); + assert!(!curr_line.contains('\n')); lines.push(curr_line); } else { let mut level: isize = 1; diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 370201e5382..eb5688b3ed8 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -2496,7 +2496,7 @@ impl<'a> Parser<'a> { let fstr = n.as_str(); self.span_err(last_span, &format!("unexpected token: `{}`", n.as_str())); - if fstr.chars().all(|x| "0123456789.".contains_char(x)) { + if fstr.chars().all(|x| "0123456789.".contains(x)) { let float = match fstr.parse::().ok() { Some(f) => f, None => continue, -- cgit 1.4.1-3-g733a5