Expand description
Creates a stream that yields the same item repeatedly.
Examples
use async_std::prelude::*;
use async_std::stream;
let mut s = stream::repeat(7);
assert_eq!(s.next().await, Some(7));
assert_eq!(s.next().await, Some(7));
Creates a stream that yields the same item repeatedly.
use async_std::prelude::*;
use async_std::stream;
let mut s = stream::repeat(7);
assert_eq!(s.next().await, Some(7));
assert_eq!(s.next().await, Some(7));