summaryrefslogtreecommitdiffstats
path: root/tokio/src/sync/mod.rs
diff options
context:
space:
mode:
authorBlas Rodriguez Irizar <rodrigblas@gmail.com>2020-09-02 05:57:48 +0200
committerGitHub <noreply@github.com>2020-09-01 20:57:48 -0700
commit5a1a6dc90c6d5a7eb5f31ae215f9ec383d6767aa (patch)
treec4ca532bc6a9a09c1defa9e4eb9527fd92d9e7d9 /tokio/src/sync/mod.rs
parent827077409c8a8ef7adb4d05d522fcf6c1949c876 (diff)
sync: watch channel breaking changes (#2806)
Fixes: #2172
Diffstat (limited to 'tokio/src/sync/mod.rs')
-rw-r--r--tokio/src/sync/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/tokio/src/sync/mod.rs b/tokio/src/sync/mod.rs
index 7052976b..5d66512d 100644
--- a/tokio/src/sync/mod.rs
+++ b/tokio/src/sync/mod.rs
@@ -330,7 +330,7 @@
//! // If the configuration changed, send the new config value
//! // on the watch channel.
//! if new_config != config {
-//! tx.broadcast(new_config.clone()).unwrap();
+//! tx.send(new_config.clone()).unwrap();
//! config = new_config;
//! }
//! }
@@ -358,7 +358,7 @@
//! // Receive the **initial** configuration value. As this is the
//! // first time the config is received from the watch, it will
//! // always complete immediatedly.
-//! let mut conf = rx.recv().await.unwrap();
+//! let mut conf = rx.recv().await;
//!
//! let mut op_start = Instant::now();
//! let mut delay = time::delay_until(op_start + conf.timeout);
@@ -376,7 +376,7 @@
//! delay = time::delay_until(op_start + conf.timeout);
//! }
//! new_conf = rx.recv() => {
-//! conf = new_conf.unwrap();
+//! conf = new_conf;
//!
//! // The configuration has been updated. Update the
//! // `delay` using the new `timeout` value.