1
Fork 0

Fixed-size byte string literals (RFC 339)

This commit is contained in:
Vadim Petrochenkov 2015-02-26 11:25:16 +03:00
parent bfac337daa
commit 1e9bef916f
10 changed files with 100 additions and 43 deletions

View file

@ -622,7 +622,7 @@ mod tests {
#[test]
fn test_read_line() {
let in_buf = b"a\nb\nc";
let in_buf: &[u8] = b"a\nb\nc";
let mut reader = BufReader::with_capacity(2, in_buf);
let mut s = String::new();
reader.read_line(&mut s).unwrap();
@ -640,7 +640,7 @@ mod tests {
#[test]
fn test_lines() {
let in_buf = b"a\nb\nc";
let in_buf: &[u8] = b"a\nb\nc";
let reader = BufReader::with_capacity(2, in_buf);
let mut it = reader.lines();
assert_eq!(it.next(), Some(Ok("a".to_string())));