From 07ea3df0c2e00826b81528c8995956308738a912 Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Wed, 5 Apr 2023 09:58:21 -0700 Subject: [PATCH] Fix links to 'Stream!' in 'ws' rustdocs. --- contrib/ws/src/websocket.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/contrib/ws/src/websocket.rs b/contrib/ws/src/websocket.rs index c819f49f..7e2f2c49 100644 --- a/contrib/ws/src/websocket.rs +++ b/contrib/ws/src/websocket.rs @@ -21,10 +21,11 @@ use crate::result::{Result, Error}; /// This is the entrypoint to the library. Every WebSocket response _must_ /// initiate via the `WebSocket` request guard. The guard identifies valid /// WebSocket connection requests and, if the request is valid, succeeds to be -/// converted into a streaming WebSocket response via [`Stream!`], -/// [`WebSocket::channel()`], or [`WebSocket::stream()`]. The connection can be -/// configured via [`WebSocket::config()`]; see [`Config`] for details on -/// configuring a connection. +/// converted into a streaming WebSocket response via +/// [`Stream!`](crate::Stream!), [`WebSocket::channel()`], or +/// [`WebSocket::stream()`]. The connection can be configured via +/// [`WebSocket::config()`]; see [`Config`] for details on configuring a +/// connection. /// /// ### Forwarding /// @@ -123,8 +124,8 @@ impl WebSocket { /// /// This method takes a `FnOnce` `stream` that consumes a read-only stream /// and returns a stream of [`Message`]s. While the returned stream can be - /// constructed in any manner, the [`Stream!`] macro is the preferred - /// method. In any case, the stream must be `Send`. + /// constructed in any manner, the [`Stream!`](crate::Stream!) macro is the + /// preferred method. In any case, the stream must be `Send`. /// /// The returned stream must emit items of type `Result`. Items /// that are `Ok(Message)` are sent to the client while items of type @@ -175,6 +176,8 @@ pub struct Channel<'r> { /// This type should not be used directly. Instead, it is used via the /// [`Stream!`] macro, which expands to both the type itself and an expression /// which evaluates to this type. See [`Stream!`] for details. +/// +/// [`Stream!`]: crate::Stream! // TODO: Get rid of this or `Channel` via a single `enum`. pub struct MessageStream<'r, S> { ws: WebSocket,