@@ -116,8 +116,6 @@ impl<E> Builder<E> {
116
116
/// If not set, hyper will use a default.
117
117
///
118
118
/// [spec]: https://http2.github.io/http2-spec/#SETTINGS_INITIAL_WINDOW_SIZE
119
- #[ cfg( feature = "http2" ) ]
120
- #[ cfg_attr( docsrs, doc( cfg( feature = "http2" ) ) ) ]
121
119
pub fn http2_initial_stream_window_size ( & mut self , sz : impl Into < Option < u32 > > ) -> & mut Self {
122
120
if let Some ( sz) = sz. into ( ) {
123
121
self . h2_builder . adaptive_window = false ;
@@ -131,8 +129,6 @@ impl<E> Builder<E> {
131
129
/// Passing `None` will do nothing.
132
130
///
133
131
/// If not set, hyper will use a default.
134
- #[ cfg( feature = "http2" ) ]
135
- #[ cfg_attr( docsrs, doc( cfg( feature = "http2" ) ) ) ]
136
132
pub fn http2_initial_connection_window_size (
137
133
& mut self ,
138
134
sz : impl Into < Option < u32 > > ,
@@ -149,8 +145,6 @@ impl<E> Builder<E> {
149
145
/// Enabling this will override the limits set in
150
146
/// `http2_initial_stream_window_size` and
151
147
/// `http2_initial_connection_window_size`.
152
- #[ cfg( feature = "http2" ) ]
153
- #[ cfg_attr( docsrs, doc( cfg( feature = "http2" ) ) ) ]
154
148
pub fn http2_adaptive_window ( & mut self , enabled : bool ) -> & mut Self {
155
149
use proto:: h2:: SPEC_WINDOW_SIZE ;
156
150
@@ -167,8 +161,6 @@ impl<E> Builder<E> {
167
161
/// Passing `None` will do nothing.
168
162
///
169
163
/// If not set, hyper will use a default.
170
- #[ cfg( feature = "http2" ) ]
171
- #[ cfg_attr( docsrs, doc( cfg( feature = "http2" ) ) ) ]
172
164
pub fn http2_max_frame_size ( & mut self , sz : impl Into < Option < u32 > > ) -> & mut Self {
173
165
if let Some ( sz) = sz. into ( ) {
174
166
self . h2_builder . max_frame_size = sz;
@@ -182,8 +174,6 @@ impl<E> Builder<E> {
182
174
/// Default is no limit (`std::u32::MAX`). Passing `None` will do nothing.
183
175
///
184
176
/// [spec]: https://http2.github.io/http2-spec/#SETTINGS_MAX_CONCURRENT_STREAMS
185
- #[ cfg( feature = "http2" ) ]
186
- #[ cfg_attr( docsrs, doc( cfg( feature = "http2" ) ) ) ]
187
177
pub fn http2_max_concurrent_streams ( & mut self , max : impl Into < Option < u32 > > ) -> & mut Self {
188
178
self . h2_builder . max_concurrent_streams = max. into ( ) ;
189
179
self
@@ -198,8 +188,6 @@ impl<E> Builder<E> {
198
188
///
199
189
/// # Cargo Feature
200
190
///
201
- #[ cfg( feature = "http2" ) ]
202
- #[ cfg_attr( docsrs, doc( cfg( feature = "http2" ) ) ) ]
203
191
pub fn http2_keep_alive_interval (
204
192
& mut self ,
205
193
interval : impl Into < Option < Duration > > ,
@@ -217,8 +205,6 @@ impl<E> Builder<E> {
217
205
///
218
206
/// # Cargo Feature
219
207
///
220
- #[ cfg( feature = "http2" ) ]
221
- #[ cfg_attr( docsrs, doc( cfg( feature = "http2" ) ) ) ]
222
208
pub fn http2_keep_alive_timeout ( & mut self , timeout : Duration ) -> & mut Self {
223
209
self . h2_builder . keep_alive_timeout = timeout;
224
210
self
@@ -231,8 +217,6 @@ impl<E> Builder<E> {
231
217
/// # Panics
232
218
///
233
219
/// The value must be no larger than `u32::MAX`.
234
- #[ cfg( feature = "http2" ) ]
235
- #[ cfg_attr( docsrs, doc( cfg( feature = "http2" ) ) ) ]
236
220
pub fn http2_max_send_buf_size ( & mut self , max : usize ) -> & mut Self {
237
221
assert ! ( max <= std:: u32 :: MAX as usize ) ;
238
222
self . h2_builder . max_send_buffer_size = max;
@@ -242,7 +226,6 @@ impl<E> Builder<E> {
242
226
/// Enables the [extended CONNECT protocol].
243
227
///
244
228
/// [extended CONNECT protocol]: https://datatracker.ietf.org/doc/html/rfc8441#section-4
245
- #[ cfg( feature = "http2" ) ]
246
229
pub fn http2_enable_connect_protocol ( & mut self ) -> & mut Self {
247
230
self . h2_builder . enable_connect_protocol = true ;
248
231
self
@@ -251,8 +234,6 @@ impl<E> Builder<E> {
251
234
/// Sets the max size of received header frames.
252
235
///
253
236
/// Default is currently ~16MB, but may change.
254
- #[ cfg( feature = "http2" ) ]
255
- #[ cfg_attr( docsrs, doc( cfg( feature = "http2" ) ) ) ]
256
237
pub fn http2_max_header_list_size ( & mut self , max : u32 ) -> & mut Self {
257
238
self . h2_builder . max_header_list_size = max;
258
239
self
0 commit comments