clippy: use while let loops

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler
2021-01-19 14:52:20 +01:00
parent 09faa9ee95
commit 0d2133db98
2 changed files with 17 additions and 27 deletions

View File

@ -134,11 +134,7 @@ impl<I: Send + 'static> ParallelHandler<I> {
let mut msg_list = Vec::new();
let mut i = 0;
loop {
let handle = match self.handles.pop() {
Some(handle) => handle,
None => break,
};
while let Some(handle) = self.handles.pop() {
if let Err(panic) = handle.join() {
match panic.downcast::<&str>() {
Ok(panic_msg) => msg_list.push(