mirror of
https://github.com/async-rs/async-std.git
synced 2025-03-27 03:30:25 +00:00
Simpler impl
This commit is contained in:
parent
197253aa73
commit
0186124aef
1 changed files with 6 additions and 2 deletions
|
@ -22,8 +22,12 @@ enum CycleState {
|
||||||
FromBuffer,
|
FromBuffer,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: Clone, S: Stream<Item = T>> Cycle<S, T> {
|
impl<S> Cycle<S, S::Item>
|
||||||
pub fn new(source: S) -> Cycle<S, T> {
|
where
|
||||||
|
S: Stream,
|
||||||
|
S::Item: Clone,
|
||||||
|
{
|
||||||
|
pub fn new(source: S) -> Cycle<S, S::Item> {
|
||||||
Cycle {
|
Cycle {
|
||||||
source,
|
source,
|
||||||
index: 0,
|
index: 0,
|
||||||
|
|
Loading…
Reference in a new issue