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
Good catch, I think you are right from looking at how slices.Compact works - it would leave duplicate values at the end of the slice! This seems very counter-intuitive particularly as the documentation says Compact modifies the contents of the slice s; it does not create a new slice. and the similar slices.Sort function does not require this reassignment. I feel like it would be beneficial to also document this footgun in the slices documentation.
Hello, while researching for this Go proposal I noticed this code:
which probably doesn't behave as intended and should look like this instead:
I have not tried to execute it.
The text was updated successfully, but these errors were encountered: