test: Fix documendation test

This commit is contained in:
k-nasa 2020-04-24 18:22:50 +09:00
parent 461a7c3e4f
commit e962304e40
2 changed files with 3 additions and 2 deletions

View File

@ -157,6 +157,7 @@ macro_rules! blocking {
/// ```no_run
/// use smol::blocking;
/// use std::fs;
/// use futures::stream::StreamExt;
///
/// # smol::run(async {
/// let mut dir = smol::iter(blocking!(fs::read_dir("."))?);

View File

@ -89,12 +89,12 @@ impl Timer {
///
/// ```
/// use smol::Timer;
/// use std::time::{duration, Instant};
/// use std::time::{Duration, Instant};
///
/// # smol::run(async {
/// let now = Instant::now();
/// let when = now + Duration::from_secs(1);
/// Timer::after(when).await;
/// Timer::at(when).await;
/// # });
/// ```
pub fn at(when: Instant) -> Timer {