diff --git a/src/stream/from_fn.rs b/src/stream/from_fn.rs index 24432c7e..e4078662 100644 --- a/src/stream/from_fn.rs +++ b/src/stream/from_fn.rs @@ -28,6 +28,7 @@ impl Unpin for FromFn {} /// # /// use async_std::prelude::*; /// use async_std::stream; +/// use async_std::sync::{Arc, Mutex}; /// /// let mut count = 0u8; /// let s = stream::from_fn(|| { diff --git a/src/sync/mod.rs b/src/sync/mod.rs index fdeb48c3..088c520b 100644 --- a/src/sync/mod.rs +++ b/src/sync/mod.rs @@ -155,9 +155,7 @@ //! ``` //! # async_std::task::block_on(async { //! # -//! use std::sync::Arc; -//! -//! use async_std::sync::Mutex; +//! use async_std::sync::{Arc, Mutex}; //! use async_std::task; //! //! let m1 = Arc::new(Mutex::new(0)); diff --git a/src/sync/mutex.rs b/src/sync/mutex.rs index 5bec6a23..2c0ac0cc 100644 --- a/src/sync/mutex.rs +++ b/src/sync/mutex.rs @@ -19,9 +19,7 @@ use crate::task::{Context, Poll}; /// ``` /// # async_std::task::block_on(async { /// # -/// use std::sync::Arc; -/// -/// use async_std::sync::Mutex; +/// use async_std::sync::{Arc, Mutex}; /// use async_std::task; /// /// let m = Arc::new(Mutex::new(0)); @@ -77,9 +75,7 @@ impl Mutex { /// ``` /// # async_std::task::block_on(async { /// # - /// use std::sync::Arc; - /// - /// use async_std::sync::Mutex; + /// use async_std::sync::{Arc, Mutex}; /// use async_std::task; /// /// let m1 = Arc::new(Mutex::new(10)); @@ -155,9 +151,7 @@ impl Mutex { /// ``` /// # async_std::task::block_on(async { /// # - /// use std::sync::Arc; - /// - /// use async_std::sync::Mutex; + /// use async_std::sync::{Arc, Mutex}; /// use async_std::task; /// /// let m1 = Arc::new(Mutex::new(10));