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");
}
..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]