File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,7 @@ use crate::sync::Mutex;
8
8
/// ```
9
9
/// # fn main() { async_std::task::block_on(async {
10
10
/// #
11
- /// use std::sync::Arc;
12
- /// use async_std::sync::Barrier;
11
+ /// use async_std::sync::{Arc, Barrier};
13
12
/// use async_std::task;
14
13
///
15
14
/// let mut handles = Vec::with_capacity(10);
@@ -20,14 +19,13 @@ use crate::sync::Mutex;
20
19
/// // You will NOT see any interleaving.
21
20
/// handles.push(task::spawn(async move {
22
21
/// println!("before wait");
23
- /// let wr = c.wait().await;
22
+ /// c.wait().await;
24
23
/// println!("after wait");
25
- /// wr
26
24
/// }));
27
25
/// }
28
26
/// // Wait for the other futures to finish.
29
27
/// for handle in handles {
30
- /// handle.await;
28
+ /// handle.await;
31
29
/// }
32
30
/// # });
33
31
/// # }
You can’t perform that action at this time.
0 commit comments