Skip to content

models/version: Add tests for Version::top() function #3067

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

Merged
merged 2 commits into from
Dec 22, 2020

Conversation

Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Dec 3, 2020

While this can be tested through API tests it's much more convenient to have a unit tests for this functionality.

This PR is in preparation for fixing #2710, by introducing a max_stable_version property on the crate resource.

r? @jtgeibel

@jtgeibel
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Dec 22, 2020

📌 Commit ad10cdd has been approved by jtgeibel

@bors
Copy link
Contributor

bors commented Dec 22, 2020

⌛ Testing commit ad10cdd with merge 365928d...

@bors
Copy link
Contributor

bors commented Dec 22, 2020

☀️ Test successful - checks-actions
Approved by: jtgeibel
Pushing 365928d to master...

@bors bors merged commit 365928d into rust-lang:master Dec 22, 2020
@Turbo87 Turbo87 deleted the top-version-tests branch December 23, 2020 09:44
bors added a commit that referenced this pull request Jan 5, 2021
Clean up `TopVersions` code

This PR cleans up the code that figures out the `highest` and `newest` versions of a crate in several ways. I hope that the commit list gives enough context on the individual changes.

Primarily, this decouples the code from the `Version` struct, and it moves the `0.0.0` defaulting to the `encodable()` method of the `Krate` model, instead of performing that in the low-level code directly.

Like #3067, this PR is also in preparation for resolving #2710.

r? `@jtgeibel`
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.

4 participants