We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31b1f1c commit fff58b5Copy full SHA for fff58b5
src/alloc/isolated_alloc.rs
@@ -145,10 +145,7 @@ impl IsolatedAlloc {
145
if pinfo.domain_size() < offset_pinfo + size_pinfo {
146
break;
147
}
148
- // FIXME: is there a more efficient way to check whether the entire range is unset
149
- // in the bitset?
150
- let range_avail = !(offset_pinfo..offset_pinfo + size_pinfo).any(|i| pinfo.contains(i));
151
- if range_avail {
+ if !pinfo.contains_any(offset_pinfo..offset_pinfo + size_pinfo) {
152
pinfo.insert_range(offset_pinfo..offset_pinfo + size_pinfo);
153
// SAFETY: We checked the available bytes after `idx` in the call
154
// to `domain_size` above and asserted there are at least `idx +
0 commit comments