diff options
| author | bors <bors@rust-lang.org> | 2014-08-06 23:41:05 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-08-06 23:41:05 +0000 |
| commit | 8fe73f1166c0d3765cabb26680b82175ec4429cd (patch) | |
| tree | 966974cfdd23237b4efb972dd9ce8c30a7cfca63 /src/libsyntax/parse | |
| parent | b9308d1ff0b32598e791a0a68f68cf7e09a07f22 (diff) | |
| parent | 96d1712511400be7956e0902e0b4bb32ad7ee34d (diff) | |
| download | rust-8fe73f1166c0d3765cabb26680b82175ec4429cd.tar.gz rust-8fe73f1166c0d3765cabb26680b82175ec4429cd.zip | |
auto merge of #16291 : nham/rust/byte_literals, r=alexcrichton
This replaces many instances chars being casted to u8 with byte literals.
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/lexer/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs index 5c5943f0cd4..625c03ec13d 100644 --- a/src/libsyntax/parse/lexer/mod.rs +++ b/src/libsyntax/parse/lexer/mod.rs @@ -1131,8 +1131,8 @@ impl<'a> StringReader<'a> { fn read_one_line_comment(&mut self) -> String { let val = self.read_to_eol(); - assert!((val.as_bytes()[0] == '/' as u8 && val.as_bytes()[1] == '/' as u8) - || (val.as_bytes()[0] == '#' as u8 && val.as_bytes()[1] == '!' as u8)); + assert!((val.as_bytes()[0] == b'/' && val.as_bytes()[1] == b'/') + || (val.as_bytes()[0] == b'#' && val.as_bytes()[1] == b'!')); return val; } |
