From 3ae4ef2706cdef834a49d7c76d3cc0f55ae383a3 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Sun, 9 Jun 2024 05:18:43 +0100 Subject: [PATCH] docs: remove unnecessary code block annotations --- actix-session/src/storage/session_key.rs | 2 +- actix-ws/src/fut.rs | 2 +- actix-ws/src/session.rs | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/actix-session/src/storage/session_key.rs b/actix-session/src/storage/session_key.rs index cb73a6b22..659b80a7f 100644 --- a/actix-session/src/storage/session_key.rs +++ b/actix-session/src/storage/session_key.rs @@ -7,7 +7,7 @@ use derive_more::{Display, From}; /// Session keys are stored as cookies, therefore they cannot be arbitrary long. Session keys are /// required to be smaller than 4064 bytes. /// -/// ```rust +/// ``` /// use actix_session::storage::SessionKey; /// /// let key: String = std::iter::repeat('a').take(4065).collect(); diff --git a/actix-ws/src/fut.rs b/actix-ws/src/fut.rs index a025a429b..913cc1d14 100644 --- a/actix-ws/src/fut.rs +++ b/actix-ws/src/fut.rs @@ -65,7 +65,7 @@ impl MessageStream { /// Wait for the next item from the message stream /// - /// ```rust,no_run + /// ```no_run /// # use actix_ws::MessageStream; /// # async fn test(mut stream: MessageStream) { /// while let Some(Ok(msg)) = stream.recv().await { diff --git a/actix-ws/src/session.rs b/actix-ws/src/session.rs index 3bbfbabbc..4855b4760 100644 --- a/actix-ws/src/session.rs +++ b/actix-ws/src/session.rs @@ -45,7 +45,7 @@ impl Session { /// Send text into the websocket /// - /// ```rust,no_run + /// ```no_run /// # use actix_ws::Session; /// # async fn test(mut session: Session) { /// if session.text("Some text").await.is_err() { @@ -67,7 +67,7 @@ impl Session { /// Send raw bytes into the websocket /// - /// ```rust,no_run + /// ```no_run /// # use actix_ws::Session; /// # async fn test(mut session: Session) { /// if session.binary(&b"some bytes"[..]).await.is_err() { @@ -92,7 +92,7 @@ impl Session { /// For many applications, it will be important to send regular pings to keep track of if the /// client has disconnected /// - /// ```rust,no_run + /// ```no_run /// # use actix_ws::Session; /// # async fn test(mut session: Session) { /// if session.ping(b"").await.is_err() { @@ -114,7 +114,7 @@ impl Session { /// Pong the client /// - /// ```rust,no_run + /// ```no_run /// # use actix_ws::{Message, Session}; /// # async fn test(mut session: Session, msg: Message) { /// match msg { @@ -140,14 +140,14 @@ impl Session { /// /// Be wary of this method. Continuations represent multiple frames that, when combined, are /// presented as a single message. They are useful when the entire contents of a message are - /// not avilable all at once. However, continuations MUST NOT be interrupted by other Text or + /// not available all at once. However, continuations MUST NOT be interrupted by other Text or /// Binary messages. Control messages such as Ping, Pong, or Close are allowed to interrupt a /// continuation. /// /// Continuations must be initialized with a First variant, and must be terminated by a Last /// variant, with only Continue variants sent in between. /// - /// ```rust,no_run + /// ```no_run /// # use actix_ws::{Item, Session}; /// # async fn test(mut session: Session) -> Result<(), Box> { /// session.continuation(Item::FirstText("Hello".into())).await?; @@ -172,7 +172,7 @@ impl Session { /// /// All clones will return `Err(Closed)` if used after this call /// - /// ```rust,no_run + /// ```no_run /// # use actix_ws::{Closed, Session}; /// # async fn test(mut session: Session) -> Result<(), Closed> { /// session.close(None).await