From 6a2f4e7922323988f600782155e71fb64e5b2a27 Mon Sep 17 00:00:00 2001 From: Luqman Aden Date: Sat, 30 Oct 2021 10:59:39 -0700 Subject: [PATCH] feat(upgrade): allow http upgrades on with body type Allow using `Request`/`Response` for any given T with `upgrade::on` instead of just restricting it to `hyper::Body`. --- src/upgrade.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/upgrade.rs b/src/upgrade.rs index be4e48220f..58a4702049 100644 --- a/src/upgrade.rs +++ b/src/upgrade.rs @@ -258,7 +258,7 @@ mod sealed { fn on_upgrade(self) -> OnUpgrade; } - impl CanUpgrade for http::Request { + impl CanUpgrade for http::Request { fn on_upgrade(mut self) -> OnUpgrade { self.extensions_mut() .remove::() @@ -266,7 +266,7 @@ mod sealed { } } - impl CanUpgrade for &'_ mut http::Request { + impl CanUpgrade for &'_ mut http::Request { fn on_upgrade(self) -> OnUpgrade { self.extensions_mut() .remove::() @@ -274,7 +274,7 @@ mod sealed { } } - impl CanUpgrade for http::Response { + impl CanUpgrade for http::Response { fn on_upgrade(mut self) -> OnUpgrade { self.extensions_mut() .remove::() @@ -282,7 +282,7 @@ mod sealed { } } - impl CanUpgrade for &'_ mut http::Response { + impl CanUpgrade for &'_ mut http::Response { fn on_upgrade(self) -> OnUpgrade { self.extensions_mut() .remove::()