diff --git a/http-body/src/lib.rs b/http-body/src/lib.rs index 81acdaa..12077a2 100644 --- a/http-body/src/lib.rs +++ b/http-body/src/lib.rs @@ -141,6 +141,8 @@ impl Body for http::Request { self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll, Self::Error>>> { + // SAFETY: + // A pin projection. unsafe { self.map_unchecked_mut(http::Request::body_mut) .poll_frame(cx) @@ -164,6 +166,8 @@ impl Body for http::Response { self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll, Self::Error>>> { + // SAFETY: + // A pin projection. unsafe { self.map_unchecked_mut(http::Response::body_mut) .poll_frame(cx)