diff options
| author | Kevin Butler <haqkrs@gmail.com> | 2015-11-09 21:04:31 +0000 |
|---|---|---|
| committer | Kevin Butler <haqkrs@gmail.com> | 2016-01-14 22:47:50 +0000 |
| commit | 8a2723010290077bca034cd988067c70d0a638db (patch) | |
| tree | 6cf649b81664d88deb192d55f00cbf4f3bd5ff1c /src/libsyntax/util | |
| parent | c12c42de0ac3f4ab50f2c138e53e6e94f8da11ec (diff) | |
| download | rust-8a2723010290077bca034cd988067c70d0a638db.tar.gz rust-8a2723010290077bca034cd988067c70d0a638db.zip | |
libsyntax: use char::is_whitespace instead of custom implementations
Fixes #29590.
Diffstat (limited to 'src/libsyntax/util')
| -rw-r--r-- | src/libsyntax/util/parser_testing.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libsyntax/util/parser_testing.rs b/src/libsyntax/util/parser_testing.rs index 454b925a494..74ff42b5db9 100644 --- a/src/libsyntax/util/parser_testing.rs +++ b/src/libsyntax/util/parser_testing.rs @@ -140,9 +140,8 @@ fn scan_for_non_ws_or_end(a : &str, idx: usize) -> usize { i } -/// Copied from lexer. pub fn is_whitespace(c: char) -> bool { - return c == ' ' || c == '\t' || c == '\r' || c == '\n'; + c.is_whitespace() } #[cfg(test)] |
