2
0
Fork 1
mirror of https://github.com/async-rs/async-std.git synced 2025-02-01 02:05:34 +00:00

fix StdinLock doc test

This commit is contained in:
k-nasa 2019-10-17 16:32:14 +09:00
parent a5a00d7b14
commit 70e8476264

View file

@ -151,14 +151,14 @@ impl Stdin {
/// # fn main() -> std::io::Result<()> { async_std::task::block_on(async { /// # fn main() -> std::io::Result<()> { async_std::task::block_on(async {
/// # /// #
/// use async_std::io; /// use async_std::io;
/// use std::io::Read; /// use crate::async_std::prelude::*;
/// ///
/// let mut buffer = String::new(); /// let mut buffer = String::new();
/// ///
/// let stdin = io::stdin(); /// let stdin = io::stdin();
/// let mut handle = stdin.lock().await; /// let mut handle = stdin.lock().await;
/// ///
/// handle.read_to_string(&mut buffer)?; /// handle.read_to_string(&mut buffer).await?;
/// # /// #
/// # Ok(()) }) } /// # Ok(()) }) }
/// ``` /// ```