Skip to content

Commit

Permalink
change main doctest example
Browse files Browse the repository at this point in the history
This should make the main doctest easier to follow
  • Loading branch information
yoshuawuyts committed Jan 27, 2020
1 parent 67ace5b commit aa7d2bc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
//!
//! # Examples
//!
//! ```
//! ```no_run
//! # #[async_std::main]
//! # async fn main() {
//! use std::time::Duration;
//! use futures_timer::Delay;
//! use futures::executor::block_on;
//!
//! let now = block_on(Delay::new(Duration::from_secs(3)));
//! let now = Delay::new(Duration::from_secs(3)).await;
//! println!("waited for 3 secs");
//! # }
//! ```

#![deny(missing_docs)]
Expand Down

0 comments on commit aa7d2bc

Please sign in to comment.