Use into_par_iter instead of par_bridge (#3435)

## Summary

Use the native rayon range iterator instead of bridging the standard
library's.
This commit is contained in:
DaniPopes 2024-05-07 21:38:35 +02:00 committed by GitHub
parent d665410d59
commit c59cb1381a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -17,7 +17,7 @@ pub fn unzip<R: Send + std::io::Read + std::io::Seek + HasLength>(
let archive = ZipArchive::new(CloneableSeekableReader::new(reader))?;
let directories = Mutex::new(FxHashSet::default());
(0..archive.len())
.par_bridge()
.into_par_iter()
.map(|file_number| {
let mut archive = archive.clone();
let mut file = archive.by_index(file_number)?;