From 9366fe6b9d3a9100e09c59c9f6a435ba431ddf83 Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Wed, 25 Oct 2023 09:26:46 +1000 Subject: [PATCH] Use Result::ok() in job_token.rs Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> --- src/job_token.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/job_token.rs b/src/job_token.rs index 30049b56e..fd747785c 100644 --- a/src/job_token.rs +++ b/src/job_token.rs @@ -146,11 +146,7 @@ mod inprocess_jobserver { } }); - if res.is_ok() { - Some(JobToken()) - } else { - None - } + res.ok().map(|_| JobToken()) } pub(super) fn release_token_raw(&self) {