1
Fork 0

serialize: base64: remove some .as_bytes() from the tests

This commit is contained in:
Arcterus 2014-12-09 00:21:43 -08:00
parent a943a7a4e5
commit a119ad83c7

View file

@ -320,8 +320,8 @@ mod tests {
fn test_to_base64_crlf_line_break() {
assert!(![0u8, ..1000].to_base64(Config {line_length: None, ..STANDARD})
.contains("\r\n"));
assert_eq!("foobar".as_bytes().to_base64(Config {line_length: Some(4),
..STANDARD}),
assert_eq!(b"foobar".to_base64(Config {line_length: Some(4),
..STANDARD}),
"Zm9v\r\nYmFy");
}
@ -332,10 +332,10 @@ mod tests {
..STANDARD})
.as_slice()
.contains("\n"));
assert_eq!("foobar".as_bytes().to_base64(Config {line_length: Some(4),
newline: Newline::LF,
..STANDARD}),
"Zm9v\nYmFy".to_string());
assert_eq!(b"foobar".to_base64(Config {line_length: Some(4),
newline: Newline::LF,
..STANDARD}),
"Zm9v\nYmFy");
}
#[test]