Skip to content

Commit dc5d143

Browse files
author
Stjepan Glavina
committed
Merge branch 'master' into cleanup-stream
2 parents c2f750d + 352f18b commit dc5d143

File tree

3 files changed

+5
-12
lines changed

3 files changed

+5
-12
lines changed

src/stream/from_fn.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ impl<F> Unpin for FromFn<F> {}
2828
/// #
2929
/// use async_std::prelude::*;
3030
/// use async_std::stream;
31+
/// use async_std::sync::{Arc, Mutex};
3132
///
3233
/// let mut count = 0u8;
3334
/// let s = stream::from_fn(|| {

src/sync/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,7 @@
155155
//! ```
156156
//! # async_std::task::block_on(async {
157157
//! #
158-
//! use std::sync::Arc;
159-
//!
160-
//! use async_std::sync::Mutex;
158+
//! use async_std::sync::{Arc, Mutex};
161159
//! use async_std::task;
162160
//!
163161
//! let m1 = Arc::new(Mutex::new(0));

src/sync/mutex.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ use crate::task::{Context, Poll};
1919
/// ```
2020
/// # async_std::task::block_on(async {
2121
/// #
22-
/// use std::sync::Arc;
23-
///
24-
/// use async_std::sync::Mutex;
22+
/// use async_std::sync::{Arc, Mutex};
2523
/// use async_std::task;
2624
///
2725
/// let m = Arc::new(Mutex::new(0));
@@ -77,9 +75,7 @@ impl<T> Mutex<T> {
7775
/// ```
7876
/// # async_std::task::block_on(async {
7977
/// #
80-
/// use std::sync::Arc;
81-
///
82-
/// use async_std::sync::Mutex;
78+
/// use async_std::sync::{Arc, Mutex};
8379
/// use async_std::task;
8480
///
8581
/// let m1 = Arc::new(Mutex::new(10));
@@ -155,9 +151,7 @@ impl<T> Mutex<T> {
155151
/// ```
156152
/// # async_std::task::block_on(async {
157153
/// #
158-
/// use std::sync::Arc;
159-
///
160-
/// use async_std::sync::Mutex;
154+
/// use async_std::sync::{Arc, Mutex};
161155
/// use async_std::task;
162156
///
163157
/// let m1 = Arc::new(Mutex::new(10));

0 commit comments

Comments
 (0)