You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would have been handy for matrix-org/matrix-rust-sdk#4346 (review). I suppose that to make the proposed fix work, we would need swap_remove() to return the index of the swapped value too (even though one could imagine it's always the index of the last element).
The text was updated successfully, but these errors were encountered:
I'm not really convinced, tbh. That PR didn't end up with something like swap_remove, the only case I've seen it used is where ordering is irrelevant, because it's faster for Vec and similar collection types.
I suppose for Vector, if it consists of a single chunk the same thing applies. But for larger instances, I think that's not the case. Also, having an extra VectorDiff variant also means that every consumer has to handle that as well. I've thought of ways around that, but I don't think there's a great solution.
This would have been handy for matrix-org/matrix-rust-sdk#4346 (review). I suppose that to make the proposed fix work, we would need
swap_remove()
to return the index of the swapped value too (even though one could imagine it's always the index of the last element).The text was updated successfully, but these errors were encountered: