2
0
Fork 1
mirror of https://github.com/async-rs/async-std.git synced 2025-02-28 15:19:41 +00:00

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

This commit is contained in:
Stjepan Glavina 2019-11-11 11:10:36 +01:00 committed by GitHub
parent 417b548692
commit 352f18bc2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 14 deletions

View file

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

View file

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

View file

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