Skip to content

Commit a119ad8

Browse files
committed
serialize: base64: remove some .as_bytes() from the tests
1 parent a943a7a commit a119ad8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/libserialize/base64.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,8 @@ mod tests {
320320
fn test_to_base64_crlf_line_break() {
321321
assert!(![0u8, ..1000].to_base64(Config {line_length: None, ..STANDARD})
322322
.contains("\r\n"));
323-
assert_eq!("foobar".as_bytes().to_base64(Config {line_length: Some(4),
324-
..STANDARD}),
323+
assert_eq!(b"foobar".to_base64(Config {line_length: Some(4),
324+
..STANDARD}),
325325
"Zm9v\r\nYmFy");
326326
}
327327

@@ -332,10 +332,10 @@ mod tests {
332332
..STANDARD})
333333
.as_slice()
334334
.contains("\n"));
335-
assert_eq!("foobar".as_bytes().to_base64(Config {line_length: Some(4),
336-
newline: Newline::LF,
337-
..STANDARD}),
338-
"Zm9v\nYmFy".to_string());
335+
assert_eq!(b"foobar".to_base64(Config {line_length: Some(4),
336+
newline: Newline::LF,
337+
..STANDARD}),
338+
"Zm9v\nYmFy");
339339
}
340340

341341
#[test]

0 commit comments

Comments
 (0)