diff options
| author | Josh Stone <jistone@redhat.com> | 2017-03-22 10:32:38 -0700 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2017-03-22 10:32:38 -0700 |
| commit | a033f1a8eeb55bdf93749a5d0c4d803bbe0d8dfc (patch) | |
| tree | bdc15fafafdfbec66a4dab31347198a1164e8228 /src/rustllvm/RustWrapper.cpp | |
| parent | cab4bff3de1a61472f3c2e7752ef54b87344d1c9 (diff) | |
| download | rust-a033f1a8eeb55bdf93749a5d0c4d803bbe0d8dfc.tar.gz rust-a033f1a8eeb55bdf93749a5d0c4d803bbe0d8dfc.zip | |
Simplify hash table drops
This replaces the `std::collections::hash::table::RevMoveBuckets` iterator with a simpler `while` loop. This iterator was only used for dropping the remaining elements of a `RawTable`, so instead we can just loop through directly and drop them in place. This should be functionally equivalent to the former code, but a little easier to read. I was hoping it might have some performance benefit too, but it seems the optimizer was already good enough to see through the iterator -- the generated code is nearly the same. Maybe it will still help if an element type has more complicated drop code.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
