Skip to content

Commit af27fc2

Browse files
committed
[runtime] cleanup
1 parent d6bdfdf commit af27fc2

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

runtime/src/utils/thread.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,9 @@ pub(crate) fn available_cpus() -> Option<NonEmptyVec<usize>> {
169169
// larger buffer. Cap the probe size so invalid environments
170170
// cannot force unbounded growth.
171171
words = words.checked_mul(2)?;
172-
if words
172+
words
173173
.checked_mul(word_bits)
174-
.is_none_or(|bits| bits > MAX_AFFINITY_CPUS)
175-
{
176-
return None;
177-
}
174+
.map(|bits| bits > MAX_AFFINITY_CPUS)?;
178175
}
179176
_ => return None,
180177
}

0 commit comments

Comments
 (0)