Use async_std::sync::Arc in examples (#501)

pull/506/head
Stjepan Glavina 5 years ago committed by GitHub
parent 417b548692
commit 352f18bc2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -34,8 +34,7 @@ pin_project! {
/// # async_std::task::block_on(async {
/// #
/// use async_std::prelude::*;
/// use async_std::sync::Mutex;
/// use std::sync::Arc;
/// use async_std::sync::{Arc, Mutex};
/// use async_std::stream;
///
/// let count = Arc::new(Mutex::new(0u8));

@ -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));

@ -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<T> Mutex<T> {
/// ```
/// # 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<T> Mutex<T> {
/// ```
/// # 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));

Loading…
Cancel
Save