Skip to content
This repository has been archived by the owner on May 18, 2022. It is now read-only.

External code can't access Consume fields, and thus can't implement Consumer #145

Closed
daboross opened this issue Aug 13, 2020 · 2 comments · Fixed by #148
Closed

External code can't access Consume fields, and thus can't implement Consumer #145

daboross opened this issue Aug 13, 2020 · 2 comments · Fixed by #148
Labels
status: needs code An implementation or a bugfix need to be written type: bug Something isn't behaving as intended

Comments

@daboross
Copy link
Contributor

I ran into this when copying over the implementation from #137 into a crate outside of rubble - it looks like Consume, the type used for conveying results to Consumer, has private fields only accessible to rubble. Unless I'm missing a way to get into Consume::consume and Consume::result, this prevents outside users from implementing queues built to their needs.

I think this could be fixed pretty easily by either making fields public (maybe with an adding private () field for forward compatibility), or by adding accessors. If it's alright, I'll submit a PR - I mildly favor accessors, but since rubble's still pre-1.0, and Consume is fairly feature-complete for what it is, it probably doesn't matter a ton?

@jonas-schievink
Copy link
Owner

Oof, yeah, feel free to add accessors.

@jonas-schievink jonas-schievink added status: needs code An implementation or a bugfix need to be written type: bug Something isn't behaving as intended labels Aug 13, 2020
@daboross
Copy link
Contributor Author

Will do then. Filed #148!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: needs code An implementation or a bugfix need to be written type: bug Something isn't behaving as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants