From 1b05b8399c7e80d26e97c6afdd7cdf98a0fb9271 Mon Sep 17 00:00:00 2001 From: michele Date: Sun, 15 May 2022 17:32:31 +0200 Subject: [PATCH] #136 Fixed doctests --- rstest_macros/src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rstest_macros/src/lib.rs b/rstest_macros/src/lib.rs index 251f898..46818a2 100644 --- a/rstest_macros/src/lib.rs +++ b/rstest_macros/src/lib.rs @@ -760,6 +760,13 @@ pub fn fixture( /// duration. /// /// ```rust +/// # use rstest::*; +/// # use std::time::Duration; +/// # +/// # async fn delayed_sum(a: u32, b: u32,delay: Duration) -> u32 { +/// # async_std::task::sleep(delay).await; +/// # a + b +/// # } /// fn ms(ms: u32) -> Duration { /// Duration::from_millis(ms.into()) /// }