Fixed-size byte string literals (RFC 339)
This commit is contained in:
parent
bfac337daa
commit
1e9bef916f
10 changed files with 100 additions and 43 deletions
|
@ -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())));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue