From ff6130da6583188b1ccebfd706eec7f5721976a3 Mon Sep 17 00:00:00 2001 From: Alice Ryhl Date: Sun, 26 Jul 2020 21:23:06 +0200 Subject: [PATCH] time: interval Stream impl requires stream feature (#2695) Fixes: #1878 --- tokio/src/time/interval.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tokio/src/time/interval.rs b/tokio/src/time/interval.rs index 601fc7f8b..6a97f59b5 100644 --- a/tokio/src/time/interval.rs +++ b/tokio/src/time/interval.rs @@ -107,6 +107,11 @@ pub fn interval_at(start: Instant, period: Duration) -> Interval { } /// Stream returned by [`interval`](interval) and [`interval_at`](interval_at). +/// +/// This type only implements the [`Stream`] trait if the "stream" feature is +/// enabled. +/// +/// [`Stream`]: trait@crate::stream::Stream #[derive(Debug)] pub struct Interval { /// Future that completes the next time the `Interval` yields a value.