feat(http1): Make HTTP/1 support an optional feature
cc #2251 BREAKING CHANGE: This puts all HTTP/1 methods and support behind an `http1` cargo feature, which will not be enabled by default. To use HTTP/1, add `features = ["http1"]` to the hyper dependency in your `Cargo.toml`.
This commit is contained in:
@@ -162,11 +162,13 @@ impl<T, U> Receiver<T, U> {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "http1")]
|
||||
pub(crate) fn close(&mut self) {
|
||||
self.taker.cancel();
|
||||
self.inner.close();
|
||||
}
|
||||
|
||||
#[cfg(feature = "http1")]
|
||||
pub(crate) fn try_recv(&mut self) -> Option<(T, Callback<T, U>)> {
|
||||
match self.inner.try_recv() {
|
||||
Ok(mut env) => env.0.take(),
|
||||
|
||||
Reference in New Issue
Block a user