Merge pull request #16 from stjepang/k-nasa/fix_test_code

Fix documendation test
This commit is contained in:
Stjepan Glavina 2020-04-24 03:03:28 -07:00 committed by GitHub
commit b3de75ee20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 {