Make `assert_len` more succint

This commit is contained in:
Christian Poveda 2023-12-04 10:39:47 -05:00 committed by Daniel McCarney
parent 3f58ce889e
commit 838304ad5e
1 changed files with 1 additions and 5 deletions

View File

@ -723,11 +723,7 @@ mod tests {
}
fn assert_len(want: usize, got: io::Result<usize>) {
if let Ok(gotval) = got {
assert_eq!(gotval, want);
} else {
panic!("read failed, expected {:?} bytes", want);
}
assert_eq!(Some(want), got.ok())
}
fn pop_first(d: &mut MessageDeframer, rl: &mut RecordLayer) {