Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@meithecatte
Copy link

Because of the ToBytes impls on arrays and slices, which do not make use of to_bytes of the underlying type, implementing ToBytes makes a promise to unsafe code. This should be explicit, by having the trait itself be unsafe.

Also replaces the impl for &[T] with one for [T], to avoid depending on the layout of &[T]. This is, technically, a breaking change – however, the code that would break didn't actually work at runtime in the first place.

@KurlykovDanila
Copy link
Contributor

In your opinion, how public should this trait actually be? I looked through the library, and this trait is only used in the set_uniform functions. Maybe it should just be made unavailable for external implementation?

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.

2 participants