Skip to content

Commit

Permalink
fix(server): change max_local_error_reset_streams function to `&mut…
Browse files Browse the repository at this point in the history
… self` (#3820)

BREAKING CHANGE: `http2::Builder::max_local_error_reset_streams()` now takes `&mut self` and returns `&mut Self`. In practice, this shouldn't break almost anyone. It was the wrong receiver and return types.
  • Loading branch information
finnbear authored Jan 7, 2025
1 parent 30f2961 commit e981a91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/conn/http2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ impl<E> Builder<E> {
/// See <https://rustsec.org/advisories/RUSTSEC-2024-0003.html> for more information.
#[cfg(feature = "http2")]
#[cfg_attr(docsrs, doc(cfg(feature = "http2")))]
pub fn max_local_error_reset_streams(mut self, max: impl Into<Option<usize>>) -> Self {
pub fn max_local_error_reset_streams(&mut self, max: impl Into<Option<usize>>) -> &mut Self {
self.h2_builder.max_local_error_reset_streams = max.into();
self
}
Expand Down

0 comments on commit e981a91

Please sign in to comment.