about summary refs log tree commit diff
diff options
context:
space:
mode:
authorIvan Tham <pickfire@riseup.net>2019-08-31 23:09:37 +0800
committerGitHub <noreply@github.com>2019-08-31 23:09:37 +0800
commite2e1175ce25b6a69954b0ad3cdb15c1b684b1d92 (patch)
tree7f50e6f9bebebebc1175045a5af4e7477953a83b
parentb3146549abf25818fecfc7555f35358a948e27ad (diff)
downloadrust-e2e1175ce25b6a69954b0ad3cdb15c1b684b1d92.tar.gz
rust-e2e1175ce25b6a69954b0ad3cdb15c1b684b1d92.zip
Update sync condvar doc style
-rw-r--r--src/libstd/sync/condvar.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/sync/condvar.rs b/src/libstd/sync/condvar.rs
index aeff57716e8..65ce19f2a1b 100644
--- a/src/libstd/sync/condvar.rs
+++ b/src/libstd/sync/condvar.rs
@@ -28,14 +28,14 @@ impl WaitTimeoutResult {
     /// once the boolean has been updated and notified.
     ///
     /// ```
-    /// use std::sync::{Arc, Mutex, Condvar};
+    /// use std::sync::{Arc, Condvar, Mutex};
     /// use std::thread;
     /// use std::time::Duration;
     ///
     /// let pair = Arc::new((Mutex::new(false), Condvar::new()));
     /// let pair2 = pair.clone();
     ///
-    /// thread::spawn(move|| {
+    /// thread::spawn(move || {
     ///     let (lock, cvar) = &*pair2;
     ///
     ///     // Let's wait 20 milliseconds before notifying the condvar.