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

Table row access ergonomics #328

Closed
molpopgen opened this issue Oct 4, 2022 · 3 comments
Closed

Table row access ergonomics #328

molpopgen opened this issue Oct 4, 2022 · 3 comments
Labels
API breaking Issues/PRs that may break API. ergonomics Issues/PRs related to API ergonomics

Comments

@molpopgen
Copy link
Member

The current row access API returns Result<Option<_>, _>. The error state happens when inputs are out of bounds. We should take a clue here from stdlib and just return None for such out of bounds cases.

IMO, it is worth it to streamline code using this part of the API.

See also #327, which is the same issue for a different part of the API.

@molpopgen molpopgen added API breaking Issues/PRs that may break API. ergonomics Issues/PRs related to API ergonomics labels Oct 4, 2022
@molpopgen
Copy link
Member Author

Closing this for now -- out of range being treated as an error is fine. Client code can convert error to option in the usual way.

@molpopgen
Copy link
Member Author

Reopening -- it'd be nice to be more idiomatic w/respect to indexes not in range.

@molpopgen molpopgen reopened this Oct 29, 2022
@molpopgen
Copy link
Member Author

Closed by #351 and #355

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API breaking Issues/PRs that may break API. ergonomics Issues/PRs related to API ergonomics
Projects
None yet
Development

No branches or pull requests

1 participant