mirror of
https://github.com/async-rs/async-std.git
synced 2025-03-01 07:39:40 +00:00
Run fmt
This commit is contained in:
parent
171cc82aed
commit
fd09e2f248
1 changed files with 5 additions and 7 deletions
|
@ -22,13 +22,11 @@ enum CycleState {
|
|||
FromBuffer,
|
||||
}
|
||||
|
||||
impl<S, T> Stream for Cycle<S,T>
|
||||
where
|
||||
S: Stream<Item = T>,
|
||||
T: Clone,
|
||||
|
||||
impl<S, T> Stream for Cycle<S, T>
|
||||
where
|
||||
S: Stream<Item = T>,
|
||||
T: Clone,
|
||||
{
|
||||
|
||||
type Item = S::Item;
|
||||
|
||||
fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
|
||||
|
@ -47,7 +45,7 @@ impl<S, T> Stream for Cycle<S,T>
|
|||
}
|
||||
} else {
|
||||
let mut index = *this.index;
|
||||
if index == this.buffer.len() {
|
||||
if index == this.buffer.len() {
|
||||
index = 0
|
||||
}
|
||||
next = Some(this.buffer[index].clone());
|
||||
|
|
Loading…
Reference in a new issue