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
Auto merge of #327 - JustForFun88:master, r=Amanieu
Removing additional third copy operation for OccupiedEntry::insert
Removing unnecessary additional third copy operation for `OccupiedEntry::insert` and `OccupiedEntryRef::insert` because with `swap` we have three operation:
1. `Read` from `x` to the third value `z`,
2. `Copy` from `y` to `x`,
3. `Copy` from `z` to the `y` value.
But when we use `replace` funtion we actually do only first two operation and immediatly return z value and skip third `copy` operation
0 commit comments