1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-22 05:35:08 +02:00

add session test

This commit is contained in:
Nikolay Kim
2018-05-02 19:11:44 -07:00
parent 3623383e83
commit 58079b5bbe
2 changed files with 30 additions and 3 deletions

View File

@@ -247,7 +247,7 @@ impl<I, E> Reply<I, E> {
#[cfg(test)]
pub(crate) fn as_msg(&self) -> &I {
match self.0.as_ref().unwrap() {
ReplyResult::Ok(ref resp) => resp,
&ReplyResult::Ok(ref resp) => resp,
_ => panic!(),
}
}
@@ -255,7 +255,7 @@ impl<I, E> Reply<I, E> {
#[cfg(test)]
pub(crate) fn as_err(&self) -> Option<&E> {
match self.0.as_ref().unwrap() {
ReplyResult::Err(ref err) => Some(err),
&ReplyResult::Err(ref err) => Some(err),
_ => None,
}
}