Skip to content

Commit aa7d2bc

Browse files
committed
change main doctest example
This should make the main doctest easier to follow
1 parent 67ace5b commit aa7d2bc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/lib.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22
//!
33
//! # Examples
44
//!
5-
//! ```
5+
//! ```no_run
6+
//! # #[async_std::main]
7+
//! # async fn main() {
68
//! use std::time::Duration;
79
//! use futures_timer::Delay;
810
//! use futures::executor::block_on;
911
//!
10-
//! let now = block_on(Delay::new(Duration::from_secs(3)));
12+
//! let now = Delay::new(Duration::from_secs(3)).await;
1113
//! println!("waited for 3 secs");
14+
//! # }
1215
//! ```
1316
1417
#![deny(missing_docs)]

0 commit comments

Comments
 (0)