Skip to content

Commit

Permalink
Remove #[allow(clippy::useless_let_if_seq)]
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e authored and Nemo157 committed Apr 16, 2019
1 parent 845c71e commit 8efde61
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
7 changes: 2 additions & 5 deletions futures-util/src/async_await/join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,8 @@ macro_rules! join {
await!($crate::future::poll_fn(move |cx| {
let mut all_done = true;
$(
if $crate::core_reexport::future::Future::poll(
unsafe { $crate::core_reexport::pin::Pin::new_unchecked(&mut $fut) }, cx).is_pending()
{
all_done = false;
}
all_done &= $crate::core_reexport::future::Future::poll(
unsafe { $crate::core_reexport::pin::Pin::new_unchecked(&mut $fut) }, cx).is_ready();
)*
if all_done {
$crate::core_reexport::task::Poll::Ready(($(
Expand Down
5 changes: 1 addition & 4 deletions futures-util/src/future/join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,12 @@ macro_rules! generate {
impl<$($Fut: Future),*> Future for $Join<$($Fut),*> {
type Output = ($($Fut::Output),*);

#[allow(clippy::useless_let_if_seq)]
fn poll(
mut self: Pin<&mut Self>, cx: &mut Context<'_>
) -> Poll<Self::Output> {
let mut all_done = true;
$(
if self.as_mut().$Fut().poll(cx).is_pending() {
all_done = false;
}
all_done &= self.as_mut().$Fut().poll(cx).is_ready();
)*

if all_done {
Expand Down
1 change: 0 additions & 1 deletion futures-util/src/try_future/try_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ macro_rules! generate {
{
type Output = Result<(Fut1::Ok, $($Fut::Ok),*), Fut1::Error>;

#[allow(clippy::useless_let_if_seq)]
fn poll(
mut self: Pin<&mut Self>, cx: &mut Context<'_>
) -> Poll<Self::Output> {
Expand Down

0 comments on commit 8efde61

Please sign in to comment.