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

Maybe make payload_initializer return a Result--and handle it in the callers #24

Open
daym opened this issue May 25, 2022 · 0 comments
Open

Comments

@daym
Copy link
Collaborator

daym commented May 25, 2022

Currently, there's a few code blocks like this:

for x in xs {
   x.value()?;
}
insert_entry(..., |buf: &mut [u8]| {
   ...
   for x in xs {
      ... x.value().unwrap();
   }
}

That's because the payload_initializer (the closure above) doesn't return a Result (it doesn't return anything).

We could make it return a Result and adapt the Apcb::insert_entry caller to re-shrink the group on error again.

@daym daym changed the title Maybe payload_initializer return a Result--and handle it in the callers Maybe make payload_initializer return a Result--and handle it in the callers May 25, 2022
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

No branches or pull requests

1 participant