Skip to content

fix: issue with slices.SortFunc#168

Open
major0 wants to merge 1 commit into
ProtonMail:masterfrom
major0:fix/slices-sort
Open

fix: issue with slices.SortFunc#168
major0 wants to merge 1 commit into
ProtonMail:masterfrom
major0:fix/slices-sort

Conversation

@major0

@major0 major0 commented Jan 16, 2025

Copy link
Copy Markdown

address.go:21:33: in call to slices.SortFunc, type func(a Address, b Address) bool of func(a, b Address) bool {…} does not match inferred type func(a Address, b Address) int for func(a E, b E) int

@major0

major0 commented Jan 18, 2025

Copy link
Copy Markdown
Author

go-proton-api imports golang.org/x/exp/slices which had this issue associated to it: golang/go#61374

So go-proton-api's SortFunc was written against the experimental slices behavior. The experimental line was rewritten to match the production slices, and go-proton-api was never updated to deal with it.

> address.go:21:33: in call to slices.SortFunc, type func(a Address, b Address) bool of func(a, b Address) bool {…} does not match inferred type func(a Address, b Address) int for func(a E, b E) int
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant