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

Get rid of Option<Vec<... in the API and code, and just use Vec< #2820

Closed
dessalines opened this issue Apr 19, 2023 · 0 comments
Closed

Get rid of Option<Vec<... in the API and code, and just use Vec< #2820

dessalines opened this issue Apr 19, 2023 · 0 comments

Comments

@dessalines
Copy link
Member

I thought this made sense for clients, but it really just makes things more difficult because it requires two unwraps :

  • first checking the option, then
  • checking to make sure the list has items.

The first step isn't necessary, and you might as well just return an empty vector for missing items.

@dessalines dessalines added enhancement New feature or request area: api area: maintenance and removed enhancement New feature or request labels Apr 19, 2023
@dessalines dessalines changed the title Get rid of Option<Vec<... in the API and code. Get rid of Option<Vec<... in the API and code, and just use Vec< Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant