Skip to content

Commit

Permalink
pass clippy
Browse files Browse the repository at this point in the history
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
  • Loading branch information
yoshuawuyts committed Oct 28, 2019
1 parent ad69d85 commit f29fe54
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/future/future/try_select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ where
// future also resolved to err. Continue if not.
let mut right = this.right;
if Future::poll(Pin::new(&mut right), cx).is_ready() {
if right.as_ref().output().unwrap().is_ok() || left_errored {
if right.as_ref().output().unwrap().is_ok() {
return Poll::Ready(right.take().unwrap());
} else if left_errored {
return Poll::Ready(right.take().unwrap());
}
}
Expand Down

0 comments on commit f29fe54

Please sign in to comment.