Fix std.HashMap.remove returning incorrect KV

Now returns a copy of the removed kv instead of a pointer to the removed kv. The removed kv gets overwritten when shifting the hash map after the removal, so returning a pointer to it will have another kv's values in it after the return.

This bug had some nasty downstream effects in things like BufSet and BufMap where delete would free a still in-use KV and leave the actually removed KV un-free'd.
6a78b315b2Ryan Liptak committed on 4/7/2019, 7:47:09 PM· committed by Andrew Kelleyparent6715c54
1 file changedLine totals unavailable