Remove Wasm-specific Rayon workarounds (#3490)

This commit is contained in:
Charlie Marsh 2023-03-13 16:48:43 -04:00 committed by GitHub
parent a8c1915e2e
commit a6e998d639
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 21 deletions

View file

@ -11,7 +11,6 @@ use ruff::resolver::PyprojectDiscovery;
use ruff::{packaging, resolver, warn_user_once};
use crate::args::Overrides;
use crate::iterators::par_iter;
/// Add `noqa` directives to a collection of files.
pub fn add_noqa(
@ -42,7 +41,8 @@ pub fn add_noqa(
);
let start = Instant::now();
let modifications: usize = par_iter(&paths)
let modifications: usize = paths
.par_iter()
.flatten()
.filter_map(|entry| {
let path = entry.path();

View file

@ -19,7 +19,6 @@ use ruff_diagnostics::Diagnostic;
use crate::args::Overrides;
use crate::cache;
use crate::diagnostics::{lint_path, Diagnostics};
use crate::iterators::par_iter;
/// Run the linter over a collection of files.
pub fn run(
@ -76,7 +75,8 @@ pub fn run(
);
let start = Instant::now();
let mut diagnostics: Diagnostics = par_iter(&paths)
let mut diagnostics: Diagnostics = paths
.par_iter()
.map(|entry| {
match entry {
Ok(entry) => {