4 ms·
For example, if I could push to a Vec while holding a slice to it, that would obviously lead to horrible behavior if the Vec needed to reallocate. Another exam
by aratakareigen 7y ago
For example, if I could push to a Vec while holding a slice to it, that would obviously lead to horrible behavior if the Vec needed to reallocate.
Another example is if someone tried to use a Vec x inside the closure passed to x.drain.