From 3623383e8389bbd8ef8aa9c5edffdd96fa10d8d2 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Wed, 2 May 2018 16:48:42 -0700 Subject: [PATCH] fix tests --- src/handler.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/handler.rs b/src/handler.rs index a6a7eadb..cafb9086 100644 --- a/src/handler.rs +++ b/src/handler.rs @@ -245,8 +245,8 @@ impl Reply { } #[cfg(test)] - pub(crate) fn as_msg(&self) -> &T { - match self.0 { + pub(crate) fn as_msg(&self) -> &I { + match self.0.as_ref().unwrap() { ReplyResult::Ok(ref resp) => resp, _ => panic!(), } @@ -254,7 +254,7 @@ impl Reply { #[cfg(test)] pub(crate) fn as_err(&self) -> Option<&E> { - match self.0 { + match self.0.as_ref().unwrap() { ReplyResult::Err(ref err) => Some(err), _ => None, }