New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compress/flate: simplify sorting in huffman_code #66816
base: master
Are you sure you want to change the base?
Conversation
Replace custom sort implementations with slices.SortFunc and cmp.Compare for clarity and simplicity. This change removes the previously defined byLiteral and byFreq types and their associated methods, leveraging the standard library's generic functions to achieve the same functionality. The update makes use of "slices" and "cmp" packages for sorting, streamlining the codebase and improving readability.
This PR (HEAD: 1070520) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/578437. Important tips:
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from qiulaidongfeng: Patch Set 1: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from Go LUCI: Patch Set 1: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-04-14T11:30:52Z","revision":"2abd5f2b4bb2540aad16b99f7f8cb23d1e8edad1"} Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from qiulaidongfeng: Patch Set 1: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from Go LUCI: Patch Set 1: This CL has failed the run. Reason: Tryjob golang/try/x_tools-gotip-linux-amd64 has failed with summary (view all results): FAILURE
Error: Links: Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from Go LUCI: Patch Set 1: LUCI-TryBot-Result-1 Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from Ian Lance Taylor: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from Zhen Li: Patch Set 1: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Replace custom sort implementations with slices.SortFunc and
cmp.Compare for clarity and simplicity. This change removes
the previously defined byLiteral and byFreq types and their
associated methods, leveraging the standard library's generic
functions to achieve the same functionality.
The update makes use of "slices" and "cmp" packages for sorting,
streamlining the codebase and improving readability.