mirror of
https://github.com/fafhrd91/actix-web
synced 2025-08-22 13:45:13 +02:00
fix tests
This commit is contained in:
@@ -245,8 +245,8 @@ impl<I, E> Reply<I, E> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
pub(crate) fn as_msg(&self) -> &T {
|
pub(crate) fn as_msg(&self) -> &I {
|
||||||
match self.0 {
|
match self.0.as_ref().unwrap() {
|
||||||
ReplyResult::Ok(ref resp) => resp,
|
ReplyResult::Ok(ref resp) => resp,
|
||||||
_ => panic!(),
|
_ => panic!(),
|
||||||
}
|
}
|
||||||
@@ -254,7 +254,7 @@ impl<I, E> Reply<I, E> {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
pub(crate) fn as_err(&self) -> Option<&E> {
|
pub(crate) fn as_err(&self) -> Option<&E> {
|
||||||
match self.0 {
|
match self.0.as_ref().unwrap() {
|
||||||
ReplyResult::Err(ref err) => Some(err),
|
ReplyResult::Err(ref err) => Some(err),
|
||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user