feat(http2): Make HTTP/2 support an optional feature
cc #2251 BREAKING CHANGE: This puts all HTTP/2 methods and support behind an `http2` cargo feature, which will not be enabled by default. To use HTTP/2, add `features = ["http2"]` to the hyper dependency in your `Cargo.toml`.
This commit is contained in:
@@ -14,6 +14,7 @@ pub(crate) struct Rewind<T> {
|
||||
}
|
||||
|
||||
impl<T> Rewind<T> {
|
||||
#[cfg(any(feature = "http2", test))]
|
||||
pub(crate) fn new(io: T) -> Self {
|
||||
Rewind {
|
||||
pre: None,
|
||||
@@ -28,6 +29,7 @@ impl<T> Rewind<T> {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "http2", test))]
|
||||
pub(crate) fn rewind(&mut self, bs: Bytes) {
|
||||
debug_assert!(self.pre.is_none());
|
||||
self.pre = Some(bs);
|
||||
|
||||
Reference in New Issue
Block a user