mirror of
https://github.com/async-rs/async-std.git
synced 2025-01-31 17:55:35 +00:00
fix StdinLock doc test
This commit is contained in:
parent
a5a00d7b14
commit
70e8476264
1 changed files with 2 additions and 2 deletions
|
@ -151,14 +151,14 @@ impl Stdin {
|
|||
/// # fn main() -> std::io::Result<()> { async_std::task::block_on(async {
|
||||
/// #
|
||||
/// use async_std::io;
|
||||
/// use std::io::Read;
|
||||
/// use crate::async_std::prelude::*;
|
||||
///
|
||||
/// let mut buffer = String::new();
|
||||
///
|
||||
/// let stdin = io::stdin();
|
||||
/// let mut handle = stdin.lock().await;
|
||||
///
|
||||
/// handle.read_to_string(&mut buffer)?;
|
||||
/// handle.read_to_string(&mut buffer).await?;
|
||||
/// #
|
||||
/// # Ok(()) }) }
|
||||
/// ```
|
||||
|
|
Loading…
Reference in a new issue