mirror of https://github.com/ctz/rustls
Make `assert_len` more succint
This commit is contained in:
parent
3f58ce889e
commit
838304ad5e
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue