mirror of
https://github.com/actix/actix-web.git
synced 2025-03-10 13:31:10 +00:00
Fix two dyn warnings (#1015)
This commit is contained in:
parent
6f2049ba9b
commit
81ab37f235
1 changed files with 2 additions and 2 deletions
|
@ -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<T: ResponseError + 'static>(&self) -> Option<&T> {
|
||||
if self.__private_get_type_id__() == TypeId::of::<T>() {
|
||||
unsafe { Some(&*(self as *const ResponseError as *const T)) }
|
||||
unsafe { Some(&*(self as *const dyn ResponseError as *const T)) }
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue