clippy didnt like my code

main
Zynh0722 2023-04-09 00:04:07 -07:00
parent 807334f29b
commit cae9e20a57
1 changed files with 1 additions and 11 deletions

View File

@ -163,7 +163,6 @@ where
let writer = writer.clone();
let path = entry.path();
// This feels terribly wrong
spawn_blocking(move || {
let mut file = std::fs::File::open(path).unwrap();
let mut writer = writer.lock().unwrap();
@ -177,21 +176,12 @@ where
})
.collect();
// let out: Vec<u64> = join_all(zip_handles)
// .await
// .iter()
// .map(|v| { v.unwrap().join() })
// .collect();
join_all(zip_handles)
.await
.iter()
.map(|v| {
v.as_ref().unwrap().as_ref().unwrap()
})
.map(|v| v.as_ref().unwrap().as_ref().unwrap())
.for_each(|bytes| tracing::debug!("bytes written {bytes}"));
writer.lock().unwrap().finish()?;
Ok(())