Diff: unexpected behaviour
andriyor opened this issue · 3 comments
andriyor commented
firstSlice := pie.Ints{1, 2, 3, 3, 4, 4}
secondSlice := pie.Ints{3, 4, 5, 4, 6}
fmt.Println(firstSlice.Diff(secondSlice))
panic: runtime error: slice bounds out of range [5:4]
elliotchance commented
@andriyor happy to accept a PR if you have a fix 😄
istudko commented
https://github.com/elliotchance/pie/blob/master/pie/ints_pie.go#L143 <-- this line is causing the problem
istudko commented
@elliotchance I raised the PR, waiting for a review.