forked from mirror/async-std
add io::prelude
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
This commit is contained in:
parent
98d9284e64
commit
b1d85ab460
2 changed files with 13 additions and 0 deletions
|
@ -20,6 +20,8 @@
|
||||||
//! # Ok(()) }) }
|
//! # Ok(()) }) }
|
||||||
//! ```
|
//! ```
|
||||||
|
|
||||||
|
pub mod prelude;
|
||||||
|
|
||||||
#[doc(inline)]
|
#[doc(inline)]
|
||||||
pub use std::io::{Error, ErrorKind, Result, SeekFrom};
|
pub use std::io::{Error, ErrorKind, Result, SeekFrom};
|
||||||
|
|
||||||
|
|
11
src/io/prelude.rs
Normal file
11
src/io/prelude.rs
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
//! The I/O Prelude
|
||||||
|
//!
|
||||||
|
//! The purpose of this module is to alleviate imports of many common I/O traits
|
||||||
|
//! by adding a glob import to the top of I/O heavy modules:
|
||||||
|
//!
|
||||||
|
//! ```
|
||||||
|
//! # #![allow(unused_imports)]
|
||||||
|
//! use async_std::io::prelude::*;
|
||||||
|
//! ```
|
||||||
|
|
||||||
|
pub use super::{BufRead, Read, Seek, Write};
|
Loading…
Reference in a new issue