Skip to content

Conversation

@Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Oct 22, 2024

This allows us to simplify the find_default_version() version fn, which now only needs to iterate the slice once instead of up to three times, and it makes it possible to directly compare two Version instances too. This should be able to simplify #9722 a little bit.

@Turbo87 Turbo87 added C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear A-backend ⚙️ labels Oct 22, 2024
@Turbo87 Turbo87 requested a review from eth3lbert October 22, 2024 10:32
Copy link
Contributor

@eth3lbert eth3lbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work 😍

@Turbo87 Turbo87 force-pushed the default-versions-ord branch from 31c8918 to f66f6a5 Compare October 22, 2024 10:38
This allows us to simplify the `find_default_version()` version fn, which now only needs to iterate the slice once instead of up to three times, and it makes it possible to directly compare two `Version` instances too.
@Turbo87 Turbo87 force-pushed the default-versions-ord branch from f66f6a5 to 7351390 Compare October 22, 2024 10:42
This removes the need for the `.cloned()` call, since we can use `.into_iter()` now.
@Turbo87 Turbo87 force-pushed the default-versions-ord branch from 7351390 to 9f9992e Compare October 22, 2024 10:43
@codecov
Copy link

codecov bot commented Oct 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.88%. Comparing base (82c5403) to head (9f9992e).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9723      +/-   ##
==========================================
+ Coverage   88.87%   88.88%   +0.01%     
==========================================
  Files         289      289              
  Lines       29514    29552      +38     
==========================================
+ Hits        26231    26268      +37     
- Misses       3283     3284       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Turbo87 Turbo87 merged commit ba72798 into rust-lang:main Oct 22, 2024
10 checks passed
@Turbo87 Turbo87 deleted the default-versions-ord branch October 22, 2024 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-backend ⚙️ C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants