Rollup merge of #100862 - ehuss:tidy-crossbeam, r=Mark-Simulacrum
tidy: remove crossbeam-utils crossbeam-utils is no longer needed now that scoped threads are available in 1.63.
This commit is contained in:
commit
8332f6559b
3 changed files with 3 additions and 6 deletions
|
@ -5295,7 +5295,6 @@ name = "tidy"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cargo_metadata 0.14.0",
|
"cargo_metadata 0.14.0",
|
||||||
"crossbeam-utils",
|
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"regex",
|
"regex",
|
||||||
"walkdir",
|
"walkdir",
|
||||||
|
|
|
@ -9,7 +9,6 @@ cargo_metadata = "0.14"
|
||||||
regex = "1"
|
regex = "1"
|
||||||
lazy_static = "1"
|
lazy_static = "1"
|
||||||
walkdir = "2"
|
walkdir = "2"
|
||||||
crossbeam-utils = "0.8.0"
|
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "rust-tidy"
|
name = "rust-tidy"
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
|
|
||||||
use tidy::*;
|
use tidy::*;
|
||||||
|
|
||||||
use crossbeam_utils::thread::{scope, ScopedJoinHandle};
|
|
||||||
use std::collections::VecDeque;
|
use std::collections::VecDeque;
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::num::NonZeroUsize;
|
use std::num::NonZeroUsize;
|
||||||
|
@ -14,6 +13,7 @@ use std::path::PathBuf;
|
||||||
use std::process;
|
use std::process;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
use std::sync::atomic::{AtomicBool, Ordering};
|
use std::sync::atomic::{AtomicBool, Ordering};
|
||||||
|
use std::thread::{scope, ScopedJoinHandle};
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let root_path: PathBuf = env::args_os().nth(1).expect("need path to root of repo").into();
|
let root_path: PathBuf = env::args_os().nth(1).expect("need path to root of repo").into();
|
||||||
|
@ -44,7 +44,7 @@ fn main() {
|
||||||
handles.pop_front().unwrap().join().unwrap();
|
handles.pop_front().unwrap().join().unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
let handle = s.spawn(|_| {
|
let handle = s.spawn(|| {
|
||||||
let mut flag = false;
|
let mut flag = false;
|
||||||
$p::check($($args),* , &mut flag);
|
$p::check($($args),* , &mut flag);
|
||||||
if (flag) {
|
if (flag) {
|
||||||
|
@ -102,8 +102,7 @@ fn main() {
|
||||||
r
|
r
|
||||||
};
|
};
|
||||||
check!(unstable_book, &src_path, collected);
|
check!(unstable_book, &src_path, collected);
|
||||||
})
|
});
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
if bad.load(Ordering::Relaxed) {
|
if bad.load(Ordering::Relaxed) {
|
||||||
eprintln!("some tidy checks failed");
|
eprintln!("some tidy checks failed");
|
||||||
|
|
Loading…
Add table
Reference in a new issue