Skip to content

Commit

Permalink
$cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
k-nasa committed Oct 1, 2019
1 parent c31861a commit cc21bdf
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/stream/stream/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ where

match next {
Some(v) if (self.as_mut().predicate())(&v) => Poll::Ready(Some(v)),
Some(_) => {
Some(_) => {
cx.waker().wake_by_ref();
Poll::Pending
},
}
None => Poll::Ready(None),
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/stream/stream/find.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ where
let item = futures_core::ready!(Pin::new(&mut *self.stream).poll_next(cx));

match item {
Some(v) if (&mut self.p)(&v) => Poll::Ready(Some(v)),
Some(v) if (&mut self.p)(&v) => Poll::Ready(Some(v)),
Some(_) => {
cx.waker().wake_by_ref();
Poll::Pending
},
}
None => Poll::Ready(None),
}
}
Expand Down
10 changes: 6 additions & 4 deletions src/stream/stream/skip_while.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ where

match next {
Some(v) => match self.as_mut().predicate() {
Some(p) => if !p(&v) {
*self.as_mut().predicate() = None;
return Poll::Ready(Some(v));
},
Some(p) => {
if !p(&v) {
*self.as_mut().predicate() = None;
return Poll::Ready(Some(v));
}
}
None => return Poll::Ready(Some(v)),
},
None => return Poll::Ready(None),
Expand Down
2 changes: 1 addition & 1 deletion src/task/sleepers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ impl Sleepers {
pub fn wait(&self) {
let mut sleep = self.sleep.lock().unwrap();

if !self.notified.swap(false, Ordering::SeqCst){
if !self.notified.swap(false, Ordering::SeqCst) {
*sleep += 1;
let _ = self.wake.wait(sleep).unwrap();
}
Expand Down

0 comments on commit cc21bdf

Please sign in to comment.