]> git.lizzy.rs Git - rust.git/commitdiff
Update sync condvar doc style
authorIvan Tham <pickfire@riseup.net>
Sat, 31 Aug 2019 15:09:37 +0000 (23:09 +0800)
committerGitHub <noreply@github.com>
Sat, 31 Aug 2019 15:09:37 +0000 (23:09 +0800)
src/libstd/sync/condvar.rs

index aeff57716e86b26769b37e22162964df8c861ab8..65ce19f2a1b3a5c5a50e1fb2044410f681db829b 100644 (file)
@@ -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.