From 81ab37f23591e2404443d5cc260dca55abfa7cd5 Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Mon, 29 Jul 2019 06:10:33 +0200 Subject: [PATCH] Fix two dyn warnings (#1015) --- actix-http/src/error.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actix-http/src/error.rs b/actix-http/src/error.rs index cbb009a72..dcbc3cc93 100644 --- a/actix-http/src/error.rs +++ b/actix-http/src/error.rs @@ -89,11 +89,11 @@ pub trait ResponseError: fmt::Debug + fmt::Display { } } -impl ResponseError + 'static { +impl dyn ResponseError + 'static { /// Downcasts a response error to a specific type. pub fn downcast_ref(&self) -> Option<&T> { if self.__private_get_type_id__() == TypeId::of::() { - unsafe { Some(&*(self as *const ResponseError as *const T)) } + unsafe { Some(&*(self as *const dyn ResponseError as *const T)) } } else { None }