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

Add derive(Debug) for Producer and Consumer types. #105

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

liamkinne
Copy link
Contributor

@liamkinne liamkinne commented May 18, 2024

Another library I'm using returns these types as an Err(T) and I can't use unwrap because they don't implement Debug.

@ithinuel
Copy link
Collaborator

What does it print ?
Would it be useful for it to print the queued' items along with the queue's address ?

@liamkinne
Copy link
Contributor Author

@ithinuel output looks like:

Producer { bbq: 0x16f6664e0, pd: PhantomData<&()> }
Consumer { bbq: 0x16d9524e0, pd: PhantomData<&()> }

So that gives the address. At this point, I don't think printing the queue's contents would be a good idea since the Producer/Consumer doesn't actually own the data, just a pointer to the BBBuffer.

@liamkinne
Copy link
Contributor Author

bump @jamesmunns

Copy link
Owner

@jamesmunns jamesmunns left a comment

Choose a reason for hiding this comment

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

I don't have any concerns, I'll let @ithinuel decide whether to merge + release.

@Sympatron Sympatron merged commit b0f4d58 into jamesmunns:main Dec 9, 2024
7 of 9 checks passed
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.

4 participants