From de81985762a242c77361a6ab9de198372ca85987 Mon Sep 17 00:00:00 2001 From: Linda_pp Date: Thu, 18 Aug 2022 23:12:58 +0900 Subject: [PATCH] docs: fix indent of `tokio::sync::watch` example code (#4922) --- tokio/src/sync/watch.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tokio/src/sync/watch.rs b/tokio/src/sync/watch.rs index d4aeb2ef0ec..ce47685a664 100644 --- a/tokio/src/sync/watch.rs +++ b/tokio/src/sync/watch.rs @@ -20,15 +20,15 @@ //! use tokio::sync::watch; //! //! # async fn dox() -> Result<(), Box> { -//! let (tx, mut rx) = watch::channel("hello"); +//! let (tx, mut rx) = watch::channel("hello"); //! -//! tokio::spawn(async move { -//! while rx.changed().await.is_ok() { -//! println!("received = {:?}", *rx.borrow()); -//! } -//! }); +//! tokio::spawn(async move { +//! while rx.changed().await.is_ok() { +//! println!("received = {:?}", *rx.borrow()); +//! } +//! }); //! -//! tx.send("world")?; +//! tx.send("world")?; //! # Ok(()) //! # } //! ```