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

Allow buffer reuse in Encoder #106

Merged
merged 1 commit into from
Jul 15, 2022
Merged

Conversation

repnop
Copy link
Contributor

@repnop repnop commented Jul 8, 2022

Fixes #72

I think this should be sufficient for my use case, however I did have a question. I originally had a new_set_with_buffer but as self.output() doesn't actually use the self.output for the final encoding when is_set_encoding: true and is mem::take(&mut self.output)'d elsewhere, I felt like it would be pretty useless since the whole point is to allow reusing the buffer space for the final encoding, but this does kind of expose this implementation detail and could cause some confusion since there's a missing function, not entirely sure what a good solution is for this.

Let me know if there's anything else you'd like adjusted.

@XAMPPRocky
Copy link
Collaborator

Thank you for your PR, and congrats on your first contribution! 🎉

@XAMPPRocky
Copy link
Collaborator

Also congrats on finding an ICE. 🙂

@repnop
Copy link
Contributor Author

repnop commented Jul 17, 2022

well now, I didn't think my PR would do that much damage 😄

This was referenced Jul 11, 2023
This was referenced Jul 26, 2023
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.

Allow using user-supplied buffer for encoding data?
2 participants