Skip to content

Commit 556d799

Browse files
committed
test: fix failed doc test
1 parent bf9ee88 commit 556d799

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@
152152
//! Await two futures concurrently, and return a tuple of their output:
153153
//!
154154
//! ```
155+
//! use async_std::prelude::*;
156+
//!
155157
//! #[async_std::main]
156158
//! async fn main() {
157159
//! let a = async { 1u8 };
@@ -167,7 +169,7 @@
167169
//!
168170
//! #[async_std::main]
169171
//! async fn main() -> std::io::Result<()> {
170-
//! let mut socket = UdpSocket::bind("127.0.0.1:8080")?;
172+
//! let socket = UdpSocket::bind("127.0.0.1:8080").await?;
171173
//! println!("Listening on {}", socket.local_addr()?);
172174
//!
173175
//! let mut buf = vec![0u8; 1024];

0 commit comments

Comments
 (0)