Skip to content

Commit 7db7c24

Browse files
committed
simplify bootstrap/misc/job
Signed-off-by: onur-ozkan <[email protected]>
1 parent dbdc0e2 commit 7db7c24

File tree

1 file changed

+6
-16
lines changed

1 file changed

+6
-16
lines changed

src/bootstrap/src/misc/job.rs

+6-16
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,18 @@
1-
#[cfg(any(target_os = "haiku", target_os = "hermit", not(any(unix, windows))))]
2-
pub use custom::*;
3-
4-
#[cfg(all(unix, not(target_os = "haiku")))]
5-
pub use unix::*;
6-
71
#[cfg(windows)]
8-
pub use windows::*;
2+
pub use for_windows::*;
93

104
#[cfg(any(target_os = "haiku", target_os = "hermit", not(any(unix, windows))))]
11-
mod custom {
12-
pub unsafe fn setup(_build: &mut crate::Build) {}
13-
}
5+
pub unsafe fn setup(_build: &mut crate::Build) {}
146

157
#[cfg(all(unix, not(target_os = "haiku")))]
16-
mod unix {
17-
pub unsafe fn setup(build: &mut crate::Build) {
18-
if build.config.low_priority {
19-
libc::setpriority(libc::PRIO_PGRP as _, 0, 10);
20-
}
8+
pub unsafe fn setup(build: &mut crate::Build) {
9+
if build.config.low_priority {
10+
libc::setpriority(libc::PRIO_PGRP as _, 0, 10);
2111
}
2212
}
2313

2414
#[cfg(windows)]
25-
mod windows {
15+
mod for_windows {
2616
//! Job management on Windows for bootstrapping
2717
//!
2818
//! Most of the time when you're running a build system (e.g., make) you expect

0 commit comments

Comments
 (0)