mirror of
https://github.com/actix/actix-extras.git
synced 2025-06-26 02:19:22 +02:00
use unreachable instead of panic
This commit is contained in:
@ -364,7 +364,7 @@ mod tests {
|
||||
fn extract(frm: Poll<Option<Frame>, ProtocolError>) -> Frame {
|
||||
match frm {
|
||||
Ok(Async::Ready(Some(frame))) => frame,
|
||||
_ => panic!("error"),
|
||||
_ => unreachable!("error"),
|
||||
}
|
||||
}
|
||||
|
||||
@ -468,7 +468,7 @@ mod tests {
|
||||
|
||||
if let Err(ProtocolError::Overflow) = Frame::parse(&mut buf, false, 0) {
|
||||
} else {
|
||||
panic!("error");
|
||||
unreachable!("error");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -210,7 +210,7 @@ mod test {
|
||||
($from:expr => $opcode:pat) => {
|
||||
match OpCode::from($from) {
|
||||
e @ $opcode => (),
|
||||
e => panic!("{:?}", e)
|
||||
e => unreachable!("{:?}", e)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -220,7 +220,7 @@ mod test {
|
||||
let res: u8 = $from.into();
|
||||
match res {
|
||||
e @ $opcode => (),
|
||||
e => panic!("{:?}", e)
|
||||
e => unreachable!("{:?}", e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user