Expand description
Creates an infinite stream that yields the same item repeatedly.
Examples
use futures_lite::stream::{self, StreamExt};
let mut s = stream::repeat(7);
assert_eq!(s.next().await, Some(7));
assert_eq!(s.next().await, Some(7));
Creates an infinite stream that yields the same item repeatedly.
use futures_lite::stream::{self, StreamExt};
let mut s = stream::repeat(7);
assert_eq!(s.next().await, Some(7));
assert_eq!(s.next().await, Some(7));