Skip to content

Commit

Permalink
docs: fix indent of tokio::sync::watch example code (#4922)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Aug 18, 2022
1 parent 4b1c480 commit de81985
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tokio/src/sync/watch.rs
Expand Up @@ -20,15 +20,15 @@
//! use tokio::sync::watch;
//!
//! # async fn dox() -> Result<(), Box<dyn std::error::Error>> {
//! 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(())
//! # }
//! ```
Expand Down

0 comments on commit de81985

Please sign in to comment.