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

Return option for object get in authorities #329

Merged
merged 3 commits into from
Feb 1, 2022

Conversation

oxade
Copy link
Contributor

@oxade oxade commented Feb 1, 2022

Refactor due to change where object absence does not imply error:
#317

Copy link
Collaborator

@gdanezis gdanezis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one! Just one comment about propagating the change all the way to authority_store.

match object {
Ok(o) => Some(o),
Ok(o) => o,
Err(FastPayError::ObjectNotFound { .. }) => None,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not propagate the change all the way to the authority store, so that it also returns Option, rather than the Err(.) if the object is not available?

@oxade oxade merged commit e79df80 into main Feb 1, 2022
@huitseeker huitseeker deleted the enhance/make_object_state_return_option_object branch February 2, 2022 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants