Skip to content

Commit 4afdf6e

Browse files
committed
Auto merge of #142003 - matthiaskrgr:rollup-ad8l9ns, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - rust-lang/rust#136687 (Improve the documentation of `Display` and `FromStr`, and their interactions) - rust-lang/rust#137306 (Remove `i128` and `u128` from `improper_ctypes_definitions`) - rust-lang/rust#138699 (build dist for x86_64-pc-solaris and sparcv9-sun-solaris) - rust-lang/rust#141250 (add s390x z17 target features) - rust-lang/rust#141467 (make `OsString::new` and `PathBuf::new` unstably const) - rust-lang/rust#141871 (index: add method for checking range on DenseBitSet) - rust-lang/rust#141888 (Use non-2015 edition paths in tests that do not test for their resolution) - rust-lang/rust#142000 (bootstrap: don't symlink source dir into stage0 sysroot) r? `@ghost` `@rustbot` modify labels: rollup
2 parents b9c986e + 29f7141 commit 4afdf6e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/alloc/isolated_alloc.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,7 @@ impl IsolatedAlloc {
145145
if pinfo.domain_size() < offset_pinfo + size_pinfo {
146146
break;
147147
}
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 {
148+
if !pinfo.contains_any(offset_pinfo..offset_pinfo + size_pinfo) {
152149
pinfo.insert_range(offset_pinfo..offset_pinfo + size_pinfo);
153150
// SAFETY: We checked the available bytes after `idx` in the call
154151
// to `domain_size` above and asserted there are at least `idx +

0 commit comments

Comments
 (0)