mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-20 00:00:11 +02:00
Replace weird doc paragraph by compiler-checked must_use attribute (#1801)
Co-authored-by: David Pedersen <[email protected]>
This commit is contained in:
co-authored by
David Pedersen
parent
416a0568d3
commit
43883b8d9b
+3
-1
@@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
# 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)
|
||||
|
||||
|
||||
@@ -282,10 +282,7 @@ impl<F> WebSocketUpgrade<F> {
|
||||
|
||||
/// Finalize upgrading the connection and call the provided callback with
|
||||
/// the stream.
|
||||
///
|
||||
/// When using `WebSocketUpgrade`, the response produced by this method
|
||||
/// should be returned from the handler. See the [module docs](self) for an
|
||||
/// example.
|
||||
#[must_use = "to setup the WebSocket connection, this response must be returned"]
|
||||
pub fn on_upgrade<C, Fut>(self, callback: C) -> Response
|
||||
where
|
||||
C: FnOnce(WebSocket) -> Fut + Send + 'static,
|
||||
|
||||
Reference in New Issue
Block a user