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

Prefix::keys method never fails #766

Closed
ShadoySV opened this issue Jul 26, 2022 · 2 comments · Fixed by #774
Closed

Prefix::keys method never fails #766

ShadoySV opened this issue Jul 26, 2022 · 2 comments · Fixed by #774
Labels
enhancement New feature or request storage plus

Comments

@ShadoySV
Copy link

Keys are just skipped if deserializating of its key or value fails.
That's because de_fn returns Result which implements Iterator as well and, being iterated, returns nothing in case of error value

.flat_map(move |kv| (de_fn)(store, &pk_name, kv).map(|(k, _)| Ok(k)));

Is it desired behavior?

@maurolacy maurolacy added enhancement New feature or request storage plus breaking Breaking changes breaking-api Breaks contract API in an non-backwards-compatible way labels Aug 8, 2022
@maurolacy
Copy link
Contributor

maurolacy commented Aug 8, 2022

Good point. I think this arose because of backwards compatibility when implementing key deserialisation on top of the existing API. I agree this would be good to change / address.

@maurolacy maurolacy changed the title [cw-storage-plus] Prefix::keys method never fails Prefix::keys method never fails Aug 8, 2022
@maurolacy maurolacy removed breaking Breaking changes breaking-api Breaks contract API in an non-backwards-compatible way labels Aug 8, 2022
@ShadoySV
Copy link
Author

ShadoySV commented Aug 9, 2022

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request storage plus
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants