diff --git a/actix-http/src/header/map.rs b/actix-http/src/header/map.rs index e8118be93..3a500a70c 100644 --- a/actix-http/src/header/map.rs +++ b/actix-http/src/header/map.rs @@ -638,8 +638,15 @@ impl<'a> IntoIterator for &'a HeaderMap { /// Convert `http::HeaderMap` to our `HeaderMap`. impl From for HeaderMap { - fn from(mut map: http::HeaderMap) -> HeaderMap { - HeaderMap::from_drain(map.drain()) + fn from(mut map: http::HeaderMap) -> Self { + Self::from_drain(map.drain()) + } +} + +/// Convert our 'HeaderMap' to 'http::HeaderMap'. +impl From for http::HeaderMap { + fn from(map: HeaderMap) -> Self { + Self::from_iter(map.into_iter()) } }