Skip to content

Commit

Permalink
Use Result::ok() in job_token.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Piotr Osiewicz <[email protected]>
  • Loading branch information
NobodyXu and osiewicz authored Oct 24, 2023
1 parent 638e74e commit 9366fe6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/job_token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 9366fe6

Please sign in to comment.