Skip to content
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

prefer slices.SortFunc to sort.Sort #796

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

gammazero
Copy link
Contributor

In many situations, the newer slices.SortFunc function is more ergonomic and runs faster than sort.Sort. Using slices.SortFunc also avoids having to define custom slice types to make slices of objects sortable.

In many situations, the newer `slices.SortFunc` function is more ergonomic and runs faster than `sort.Sort`. Using `slices.SortFunc` also avoids having to define custom slice types to make slices of objects sortable.
@gammazero gammazero requested review from lidel and a team as code owners January 17, 2025 21:32
Copy link

codecov bot commented Jan 17, 2025

Codecov Report

Attention: Patch coverage is 71.87500% with 9 lines in your changes missing coverage. Please review.

Project coverage is 60.53%. Comparing base (de52bc8) to head (e5abaff).

Files with missing lines Patch % Lines
filestore/util.go 0.00% 8 Missing ⚠️
routing/http/client/client.go 50.00% 1 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #796      +/-   ##
==========================================
+ Coverage   60.52%   60.53%   +0.01%     
==========================================
  Files         245      245              
  Lines       31130    31124       -6     
==========================================
+ Hits        18841    18842       +1     
+ Misses      10613    10609       -4     
+ Partials     1676     1673       -3     
Files with missing lines Coverage Δ
bitswap/client/wantlist/wantlist.go 90.47% <100.00%> (-0.15%) ⬇️
bitswap/server/server.go 56.57% <100.00%> (+1.19%) ⬆️
gateway/headers.go 100.00% <100.00%> (ø)
ipld/merkledag/coding.go 78.03% <100.00%> (-0.33%) ⬇️
ipld/merkledag/node.go 84.48% <100.00%> (+0.05%) ⬆️
ipns/record.go 68.21% <100.00%> (ø)
routing/http/client/client.go 70.83% <50.00%> (ø)
filestore/util.go 0.00% <0.00%> (ø)

... and 12 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant