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

Use const generics in the ring_buffer module #159

Merged

Conversation

default-username-852
Copy link
Contributor

Since const generics have been stable for a while now, I thought that it was time that this crate made use of them too. It is unnecessarily restrictive to only have a couple of sizes to choose from, and to use a size that isn't supported by arrays, you have to use a heap allocation which isn't always optimal. With const generics, its possible to store arbitrarily sized buffers on the stack instead.

Copy link
Member

@est31 est31 left a comment

Choose a reason for hiding this comment

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

Thanks!

@mitchmindtree mitchmindtree merged commit 38912a8 into RustAudio:master Aug 4, 2021
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.

3 participants