1
0
Fork 0
mirror of https://github.com/tokio-rs/axum.git synced 2025-03-23 23:39:28 +01:00

Require Output = () on WebSocketStream::on_upgrade ()

Fixes https://github.com/tokio-rs/axum/issues/636
This commit is contained in:
David Pedersen 2021-12-21 11:17:56 +01:00
parent 455fc46bf3
commit 5d79c638f4
2 changed files with 4 additions and 2 deletions
axum

View file

@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
# Unreleased
- None.
- **breaking:** Require `Output = ()` on `WebSocketStream::on_upgrade` ([#644])
[#644]: https://github.com/tokio-rs/axum/pull/644
# 0.4.4 (13. January, 2021)

View file

@ -201,7 +201,7 @@ impl WebSocketUpgrade {
pub fn on_upgrade<F, Fut>(self, callback: F) -> Response
where
F: FnOnce(WebSocket) -> Fut + Send + 'static,
Fut: Future + Send + 'static,
Fut: Future<Output = ()> + Send + 'static,
{
let on_upgrade = self.on_upgrade;
let config = self.config;