Skip to content

CrateDetails should not be optional #884

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

Closed
jyn514 opened this issue Jul 7, 2020 · 0 comments · Fixed by #887
Closed

CrateDetails should not be optional #884

jyn514 opened this issue Jul 7, 2020 · 0 comments · Fixed by #887
Labels
A-frontend Area: Web frontend C-technical-debt Category: This makes the code harder to read and modify, but has no impact on end users P-low Low priority issues

Comments

@jyn514
Copy link
Member

jyn514 commented Jul 7, 2020

The more I look at this, the more I think this Option is not correct. If it's None, that means that no crate exists for the (name, version) pair:

return None;

So we should either unwrap() because we've guaranteed that this crate exists, or return a 404. I'm ok with making this a follow-up PR. The good news is this means the templates never have to handle the case when details is None.

Originally posted by @jyn514 in #879

@jyn514 jyn514 added A-frontend Area: Web frontend C-technical-debt Category: This makes the code harder to read and modify, but has no impact on end users P-low Low priority issues labels Jul 7, 2020
@Kixiron Kixiron mentioned this issue Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend Area: Web frontend C-technical-debt Category: This makes the code harder to read and modify, but has no impact on end users P-low Low priority issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant