mirror of
https://github.com/tokio-rs/axum.git
synced 2024-11-26 17:17:22 +01:00
Replace weird doc paragraph by compiler-checked must_use attribute (#1801)
Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
This commit is contained in:
parent
416a0568d3
commit
43883b8d9b
2 changed files with 4 additions and 5 deletions
|
@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
# Unreleased
|
# Unreleased
|
||||||
|
|
||||||
- None.
|
- **fixed:** Add `#[must_use]` to `WebSocketUpgrade::on_upgrade` ([#1801])
|
||||||
|
|
||||||
|
[#1801]: https://github.com/tokio-rs/axum/pull/1801
|
||||||
|
|
||||||
# 0.6.9 (24. February, 2023)
|
# 0.6.9 (24. February, 2023)
|
||||||
|
|
||||||
|
|
|
@ -282,10 +282,7 @@ impl<F> WebSocketUpgrade<F> {
|
||||||
|
|
||||||
/// Finalize upgrading the connection and call the provided callback with
|
/// Finalize upgrading the connection and call the provided callback with
|
||||||
/// the stream.
|
/// the stream.
|
||||||
///
|
#[must_use = "to setup the WebSocket connection, this response must be returned"]
|
||||||
/// When using `WebSocketUpgrade`, the response produced by this method
|
|
||||||
/// should be returned from the handler. See the [module docs](self) for an
|
|
||||||
/// example.
|
|
||||||
pub fn on_upgrade<C, Fut>(self, callback: C) -> Response
|
pub fn on_upgrade<C, Fut>(self, callback: C) -> Response
|
||||||
where
|
where
|
||||||
C: FnOnce(WebSocket) -> Fut + Send + 'static,
|
C: FnOnce(WebSocket) -> Fut + Send + 'static,
|
||||||
|
|
Loading…
Reference in a new issue