From 5bf91b390d38d93da248feb99ca98bdb1ee945b9 Mon Sep 17 00:00:00 2001 From: Laurence Tratt Date: Tue, 29 Sep 2026 09:40:16 +0100 Subject: [PATCH] Use `flags.contains`. This was a bit sloppy on my part: I didn't consider that `poll` can return events that weren't requested (e.g. you might get POLLERR even if you just asked for POLLIN). The `contains` API nicely solves this, and it's used elsewhere, but I somehow didn't modify this part. --- src/jobrunner.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jobrunner.rs b/src/jobrunner.rs index 8627bdd..80061d7 100644 --- a/src/jobrunner.rs +++ b/src/jobrunner.rs @@ -189,7 +189,7 @@ impl JobRunner { // has been received? let mut check_exit = false; match self.pollfds[self.maxjobs * 2].revents() { - Some(flags) if flags == PollFlags::POLLIN => { + Some(flags) if flags.contains(PollFlags::POLLIN) => { check_exit = true; check_queue = true; // It's fine for us to drain the event pipe completely: we'll process all the