1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-03-17 20:28:03 +02:00

deps: remove ignore's dependency on crossbeam-utils

Scoped threads are now part of std.
This commit is contained in:
Andrew Gallant 2023-01-05 08:51:08 -05:00
parent 2f484d8ce5
commit e95254a86f
No known key found for this signature in database
GPG Key ID: B2E3A4923F8B0D44
3 changed files with 3 additions and 6 deletions

1
Cargo.lock generated
View File

@ -251,7 +251,6 @@ name = "ignore"
version = "0.4.18"
dependencies = [
"crossbeam-channel",
"crossbeam-utils",
"globset",
"lazy_static",
"log",

View File

@ -19,7 +19,6 @@ name = "ignore"
bench = false
[dependencies]
crossbeam-utils = "0.8.0"
globset = { version = "0.4.10", path = "../globset" }
lazy_static = "1.1"
log = "0.4.5"

View File

@ -1282,7 +1282,7 @@ impl WalkParallel {
let quit_now = Arc::new(AtomicBool::new(false));
let num_pending =
Arc::new(AtomicUsize::new(stack.lock().unwrap().len()));
crossbeam_utils::thread::scope(|s| {
std::thread::scope(|s| {
let mut handles = vec![];
for _ in 0..threads {
let worker = Worker {
@ -1296,13 +1296,12 @@ impl WalkParallel {
skip: self.skip.clone(),
filter: self.filter.clone(),
};
handles.push(s.spawn(|_| worker.run()));
handles.push(s.spawn(|| worker.run()));
}
for handle in handles {
handle.join().unwrap();
}
})
.unwrap(); // Pass along panics from threads
});
}
fn threads(&self) -> usize {