Skip to content

Commit

Permalink
Rollup merge of #100862 - ehuss:tidy-crossbeam, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
tidy: remove crossbeam-utils

crossbeam-utils is no longer needed now that scoped threads are available in 1.63.
  • Loading branch information
matthiaskrgr authored Aug 23, 2022
2 parents f5fcac9 + add04f9 commit 8332f65
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5295,7 +5295,6 @@ name = "tidy"
version = "0.1.0"
dependencies = [
"cargo_metadata 0.14.0",
"crossbeam-utils",
"lazy_static",
"regex",
"walkdir",
Expand Down
1 change: 0 additions & 1 deletion src/tools/tidy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ cargo_metadata = "0.14"
regex = "1"
lazy_static = "1"
walkdir = "2"
crossbeam-utils = "0.8.0"

[[bin]]
name = "rust-tidy"
Expand Down
7 changes: 3 additions & 4 deletions src/tools/tidy/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

use tidy::*;

use crossbeam_utils::thread::{scope, ScopedJoinHandle};
use std::collections::VecDeque;
use std::env;
use std::num::NonZeroUsize;
use std::path::PathBuf;
use std::process;
use std::str::FromStr;
use std::sync::atomic::{AtomicBool, Ordering};
use std::thread::{scope, ScopedJoinHandle};

fn main() {
let root_path: PathBuf = env::args_os().nth(1).expect("need path to root of repo").into();
Expand Down Expand Up @@ -44,7 +44,7 @@ fn main() {
handles.pop_front().unwrap().join().unwrap();
}

let handle = s.spawn(|_| {
let handle = s.spawn(|| {
let mut flag = false;
$p::check($($args),* , &mut flag);
if (flag) {
Expand Down Expand Up @@ -102,8 +102,7 @@ fn main() {
r
};
check!(unstable_book, &src_path, collected);
})
.unwrap();
});

if bad.load(Ordering::Relaxed) {
eprintln!("some tidy checks failed");
Expand Down

0 comments on commit 8332f65

Please sign in to comment.