about summary refs log tree commit diff
path: root/src/libstd/sync
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/sync')
-rw-r--r--src/libstd/sync/condvar.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libstd/sync/condvar.rs b/src/libstd/sync/condvar.rs
index 546e105deb7..7f9b5667628 100644
--- a/src/libstd/sync/condvar.rs
+++ b/src/libstd/sync/condvar.rs
@@ -466,9 +466,11 @@ impl Condvar {
     ///
     /// // wait for the thread to start up
     /// let &(ref lock, ref cvar) = &*pair;
-    /// let result = cvar.wait_timeout_until(lock.lock().unwrap(), Duration::from_millis(100), |started| {
-    ///     *started
-    /// }).unwrap();
+    /// let result = cvar.wait_timeout_until(
+    ///     lock.lock().unwrap(),
+    ///     Duration::from_millis(100),
+    ///     |started| started,
+    /// ).unwrap();
     /// if result.1.timed_out() {
     ///     // timed-out without the condition ever evaluating to true.
     /// }