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:
parent
2f484d8ce5
commit
e95254a86f
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -251,7 +251,6 @@ name = "ignore"
|
||||
version = "0.4.18"
|
||||
dependencies = [
|
||||
"crossbeam-channel",
|
||||
"crossbeam-utils",
|
||||
"globset",
|
||||
"lazy_static",
|
||||
"log",
|
||||
|
@ -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"
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user