mirror of https://github.com/stjepang/smol
test: Fix documendation test
This commit is contained in:
parent
461a7c3e4f
commit
e962304e40
|
@ -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("."))?);
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue