-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove HybridBitSet::dummy #55127
Remove HybridBitSet::dummy #55127
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
} | ||
let mut new_dense = self_sparse.to_dense(); | ||
let changed = new_dense.union(other_dense); | ||
mem::replace(self, HybridBitSet::Dense(new_dense)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likewise
497e53c
to
5d8f0e1
Compare
@matthewjasper comment addressed. |
} | ||
let mut new_dense = self_sparse.to_dense(); | ||
let changed = new_dense.union(other_dense); | ||
*self = HybridBitSet::Dense(new_dense); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The indentation on this line is wrong.
let changed = dense.insert(elem); | ||
assert!(changed); | ||
*self = HybridBitSet::Dense(dense); | ||
changed | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might as well remove this blank line, now.
I tried this patch with an oldish (~3 weeks ago) repo and got compile errors, and then I updated and now it works. I figure NLL must have been enabled for rustc in the meantime? |
Yes, it got enabled with the beta upgrade |
Cool, I didn't know it would improve this code. That's nice! |
5d8f0e1
to
1dd92c4
Compare
Whitespaces fixed. |
@bors r+ |
📌 Commit 1dd92c4 has been approved by |
…thewjasper Remove HybridBitSet::dummy This simplifies some of the `HybridBitSet` code. cc @nnethercote
Rollup of 18 pull requests Successful merges: - #54646 (improve documentation on std::thread::sleep) - #54933 (Cleanup the rest of codegen_llvm) - #54964 (Run both lldb and gdb tests) - #55016 (Deduplicate some code and compile-time values around vtables) - #55031 (Improve verify_llvm_ir config option) - #55050 (doc std::fmt: the Python inspiration is already mentioned in precedin…) - #55077 (rustdoc: Use dyn keyword when rendering dynamic traits) - #55080 (Detect if access to localStorage is forbidden by the user's browser) - #55090 (regression test for move out of borrow via pattern) - #55102 (resolve: Do not skip extern prelude during speculative resolution) - #55104 (Add test for #34229) - #55111 ([Rustc Book] Explain --cfg's arguments) - #55122 (Cleanup mir/borrowck) - #55127 (Remove HybridBitSet::dummy) - #55128 (Fix LLVMRustInlineAsmVerify return type mismatch) - #55142 (miri: layout should not affect CTFE checks (outside of validation)) - #55151 (Cleanup nll) - #55161 ([librustdoc] Disable spellcheck for search field)
This simplifies some of the
HybridBitSet
code.cc @nnethercote