diff --git a/benches/end_to_end.rs b/benches/end_to_end.rs
index b1ee957c13..1901364db5 100644
--- a/benches/end_to_end.rs
+++ b/benches/end_to_end.rs
@@ -235,14 +235,11 @@ fn spawn_hello(rt: &mut Runtime, opts: &Opts) -> SocketAddr {
let addr = "127.0.0.1:0".parse().unwrap();
let body = opts.response_body;
- let mut builder = Server::bind(&addr)
+ let srv = Server::bind(&addr)
.http2_only(opts.http2);
- // api woopsie
- builder
- .http2_initial_stream_window_size(opts.http2_stream_window)
- .http2_initial_connection_window_size(opts.http2_conn_window);
-
- let srv = builder.serve(move || {
+ .http2_initial_stream_window_size_(opts.http2_stream_window)
+ .http2_initial_connection_window_size_(opts.http2_conn_window)
+ .serve(move || {
service_fn(move |req: Request
| {
req
.into_body()
diff --git a/src/server/mod.rs b/src/server/mod.rs
index 826d42b0be..459f17d531 100644
--- a/src/server/mod.rs
+++ b/src/server/mod.rs
@@ -302,13 +302,29 @@ impl Builder {
self
}
+ // soft-deprecated? deprecation warning just seems annoying...
+ // reimplemented to take `self` instead of `&mut self`
+ #[doc(hidden)]
+ pub fn http2_initial_stream_window_size(&mut self, sz: impl Into