Skip to content

Commit 3fc0302

Browse files
committed
Fix test and documentation according to new base64 behavior
1 parent e7ae526 commit 3fc0302

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cmp/tests/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ fn difference() {
4747
DecodeError { position: 4, kind: Length });
4848
assert_eq!(x.from_base64().unwrap(), vec![0, 0]);
4949
assert_eq!(base64::decode(x).err().unwrap(),
50-
base64::DecodeError::InvalidByte(2, b'\n'));
50+
base64::DecodeError::InvalidLength);
5151
let x = b"AAB";
5252
assert_eq!(BASE64.decode(x).err().unwrap(),
5353
DecodeError { position: 0, kind: Length });

lib/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
//! | Input | `data-encoding` | `rustc` | `base64` | GNU `base64` |
117117
//! | ---------- | --------------- | -------- | -------- | ------------- |
118118
//! | `AAB=` | `Trailing(2)` | `[0, 0]` | `[0, 0]` | `\x00\x00` |
119-
//! | `AA\nB=` | `Length(4)` | `[0, 0]` | `Err(2)` | `\x00\x00` |
119+
//! | `AA\nB=` | `Length(4)` | `[0, 0]` | `Length` | `\x00\x00` |
120120
//! | `AAB` | `Length(0)` | `[0, 0]` | `[0, 0]` | Invalid input |
121121
//! | `A\rA\nB=` | `Length(4)` | `[0, 0]` | `Err(1)` | Invalid input |
122122
//! | `-_\r\n` | `Symbol(0)` | `[251]` | `Err(0)` | Invalid input |

0 commit comments

Comments
 (0)