Skip to content

Commit b1d85ab

Browse files
committed
add io::prelude
Signed-off-by: Yoshua Wuyts <[email protected]>
1 parent 98d9284 commit b1d85ab

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/io/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
//! # Ok(()) }) }
2121
//! ```
2222
23+
pub mod prelude;
24+
2325
#[doc(inline)]
2426
pub use std::io::{Error, ErrorKind, Result, SeekFrom};
2527

src/io/prelude.rs

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//! The I/O Prelude
2+
//!
3+
//! The purpose of this module is to alleviate imports of many common I/O traits
4+
//! by adding a glob import to the top of I/O heavy modules:
5+
//!
6+
//! ```
7+
//! # #![allow(unused_imports)]
8+
//! use async_std::io::prelude::*;
9+
//! ```
10+
11+
pub use super::{BufRead, Read, Seek, Write};

0 commit comments

Comments
 (0)