Skip to content

Commit

Permalink
m: Fix new clippy warnings
Browse files Browse the repository at this point in the history
- Indicate that `async_process_force_signal_backend` is an expected cfg
  predicate.
- Use `usize::MAX` instead of `std::usize::MAX`.

Signed-off-by: John Nunley <dev@notgull.net>
  • Loading branch information
notgull committed May 26, 2024
1 parent a9e4b09 commit 415ec7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ features = [
"Win32_System_Threading",
]

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(async_process_force_signal_backend)'] }

[dev-dependencies]
async-executor = "1.5.1"
async-io = "2.1.0"
4 changes: 2 additions & 2 deletions src/reaper/signal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl Reaper {
self.pipe.wait().await;

// Notify all listeners waiting on the SIGCHLD event.
self.sigchld.notify(std::usize::MAX);
self.sigchld.notify(usize::MAX);

// Reap zombie processes, but make sure we don't hold onto the lock for too long!
let mut zombies = mem::take(&mut *self.zombies.lock().unwrap());
Expand Down Expand Up @@ -182,7 +182,7 @@ cfg_if::cfg_if! {
let reaper = match &crate::Reaper::get().sys {
super::Reaper::Signal(reaper) => reaper,
};

reaper.pipe.sender.try_send(()).ok();
}

Expand Down

0 comments on commit 415ec7f

Please sign in to comment.