-
Notifications
You must be signed in to change notification settings - Fork 645
Clean up fallback to unstable version when looking for unyanked versions #2091
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
Conversation
It was checking the result of the previous search for a stable unyanked version.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @carols10cents (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
It takes a predicate.
a44427b
to
bd3c0c0
Compare
Actually, this might not fix anything:
suggests that crates.io/app/routes/crate/version.js Line 41 in a251368
|
@charmander is there a GitHub issue for the thing that you're fixing here? do you think it would be possible to write a test case for it? |
Hi @charmander, we deliberately changed this in #1857 to fix #1144. If you can open a bug first to describe what you're trying to fix, we can work on the best way to fix it and test it! Thank you! |
@carols10cents This is a fix to a typo in that patch – the second check was supposed to be for the new |
Okay, it looks like |
The
else
inif (latestStableVersion == null)
is unreachable becauselatestStableVersion
can’t have changed since the last time it was checked. Clean up fallback to unstable version when looking for unyanked versions #2091 (comment)Array.prototype.find
only uses the boolean value of the predicate function passed to it.