time: interval Stream impl requires stream feature (#2695)

Fixes: #1878
This commit is contained in:
Alice Ryhl
2020-07-26 21:23:06 +02:00
committed by GitHub
parent 018e345add
commit ff6130da65
+5
View File
@@ -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.