Skip to content

Commit 8179f0a

Browse files
roypatdianpopa
authored andcommitted
Fix unittest
I am assuming that they failed due to the Debug impl of a private item somewhere outside of versionize changing (error variant renamed). Since that item was not public, this was not considered a breaking change. Signed-off-by: Patrick Roy <[email protected]>
1 parent c65fa15 commit 8179f0a

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/primitives.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ mod tests {
481481
<String as Versionize>::deserialize(&mut buffer.as_slice().split_at(6).0, &vm, 1)
482482
.unwrap_err(),
483483
VersionizeError::Deserialize(
484-
"Io(Custom { kind: UnexpectedEof, error: \"failed to fill whole buffer\" })"
484+
"Io(Error { kind: UnexpectedEof, message: \"failed to fill whole buffer\" })"
485485
.to_owned()
486486
)
487487
);
@@ -519,7 +519,7 @@ mod tests {
519519
<Vec<u8> as Versionize>::deserialize(&mut buffer.as_slice().split_at(6).0, &vm, 1)
520520
.unwrap_err(),
521521
VersionizeError::Deserialize(
522-
"Io(Custom { kind: UnexpectedEof, error: \"failed to fill whole buffer\" })"
522+
"Io(Error { kind: UnexpectedEof, message: \"failed to fill whole buffer\" })"
523523
.to_owned()
524524
)
525525
);

tests/test.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,7 +1182,7 @@ fn test_versionize_struct() {
11821182
.serialize(&mut snapshot_mem.as_mut_slice(), &vm, 1)
11831183
.unwrap_err(),
11841184
VersionizeError::Serialize(
1185-
"Io(Custom { kind: WriteZero, error: \"failed to write whole buffer\" })".to_owned()
1185+
"Io(Error { kind: WriteZero, message: \"failed to write whole buffer\" })".to_owned()
11861186
)
11871187
);
11881188
snapshot_mem = vec![0u8; 256];
@@ -1196,7 +1196,8 @@ fn test_versionize_struct() {
11961196
assert_eq!(
11971197
<Test as Versionize>::deserialize(&mut snapshot_mem.as_slice(), &vm, 1).unwrap_err(),
11981198
VersionizeError::Deserialize(
1199-
"Io(Custom { kind: UnexpectedEof, error: \"failed to fill whole buffer\" })".to_owned()
1199+
"Io(Error { kind: UnexpectedEof, message: \"failed to fill whole buffer\" })"
1200+
.to_owned()
12001201
)
12011202
);
12021203
}
@@ -1432,7 +1433,7 @@ fn test_versionize_famstructwrapper() {
14321433
.serialize(&mut snapshot_mem.as_mut_slice(), &vm, 1)
14331434
.unwrap_err(),
14341435
VersionizeError::Serialize(
1435-
"Io(Custom { kind: WriteZero, error: \"failed to write whole buffer\" })".to_owned()
1436+
"Io(Error { kind: WriteZero, message: \"failed to write whole buffer\" })".to_owned()
14361437
)
14371438
);
14381439
}

0 commit comments

Comments
 (0)