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

Merged
merged 3 commits into from
Jan 21, 2025
Merged

prefer slices.SortFunc to sort.Sort #796

merged 3 commits into from
Jan 21, 2025

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.47%. Comparing base (3586985) to head (65fec9a).
Report is 1 commits behind head on main.

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.53%   60.47%   -0.07%     
==========================================
  Files         245      245              
  Lines       31130    31124       -6     
==========================================
- Hits        18846    18823      -23     
- Misses      10608    10623      +15     
- Partials     1676     1678       +2     
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 11 files with indirect coverage changes

@gammazero gammazero merged commit bcf475c into main Jan 21, 2025
16 checks passed
@gammazero gammazero deleted the prefer-slices-sort branch January 21, 2025 05:24
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