We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d6bdfdf commit af27fc2Copy full SHA for af27fc2
1 file changed
runtime/src/utils/thread.rs
@@ -169,12 +169,9 @@ pub(crate) fn available_cpus() -> Option<NonEmptyVec<usize>> {
169
// larger buffer. Cap the probe size so invalid environments
170
// cannot force unbounded growth.
171
words = words.checked_mul(2)?;
172
- if words
+ words
173
.checked_mul(word_bits)
174
- .is_none_or(|bits| bits > MAX_AFFINITY_CPUS)
175
- {
176
- return None;
177
- }
+ .map(|bits| bits > MAX_AFFINITY_CPUS)?;
178
}
179
_ => return None,
180
0 commit comments