Skip to content

Commit 6e1cbdc

Browse files
committed
Simpler impl
1 parent ec438c1 commit 6e1cbdc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/stream/stream/cycle.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@ enum CycleState {
2222
FromBuffer,
2323
}
2424

25-
impl<T: Clone, S: Stream<Item = T>> Cycle<S, T> {
26-
pub fn new(source: S) -> Cycle<S, T> {
25+
impl<S> Cycle<S, S::Item>
26+
where
27+
S: Stream,
28+
S::Item: Clone,
29+
{
30+
pub fn new(source: S) -> Cycle<S, S::Item> {
2731
Cycle {
2832
source,
2933
index: 0,

0 commit comments

Comments
 (0)