From ee1a9c3230d35502dab91ace7e2cde45d77ef362 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Mon, 28 Sep 2020 09:53:43 +0200 Subject: [PATCH] parallel_handler: clippy: 'while_let_loop' Signed-off-by: Wolfgang Bumiller --- src/tools/parallel_handler.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/tools/parallel_handler.rs b/src/tools/parallel_handler.rs index 99630bc2..f1d9adec 100644 --- a/src/tools/parallel_handler.rs +++ b/src/tools/parallel_handler.rs @@ -162,13 +162,8 @@ impl<'a, I: Send + 'static> ParallelHandler<'a, I> { impl<'a, I> Drop for ParallelHandler<'a, I> { fn drop(&mut self) { drop(self.input.take()); - loop { - match self.handles.pop() { - Some(handle) => { - let _ = handle.join(); - } - None => break, - } + while let Some(handle) = self.handles.pop() { + let _ = handle.join(); } } }