mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-27 00:00:12 +02:00
Implement FusedStream and FusedFuture for Interval and Delay (#1476)
This commit is contained in:
committed by
Lucio Franco
parent
68d5fcb8d1
commit
34a9dc2d76
@@ -100,6 +100,13 @@ impl Interval {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "async-traits")]
|
||||
impl futures_core::FusedStream for Interval {
|
||||
fn is_terminated(&self) -> bool {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "async-traits")]
|
||||
impl futures_core::Stream for Interval {
|
||||
type Item = Instant;
|
||||
|
||||
Reference in New Issue
Block a user