You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't see the utility of the ComponentBytes and AsPixels traits compared to a user simply using bytemuck's cast_slice() and cast_slice_mut() methods. This could easily be achieved by optionally implementing bytemuck::Pod for all the pixel structs. Then a user could enable that crate-feature and use bytemuck to do conversions as they need.
In addition, having an crate-local implementation has had soundness flaws in the past in #35 so removing it would reduce that risk.
The text was updated successfully, but these errors were encountered:
ripytide
changed the title
Remove the ComponentBytes trait
Remove the ComponentBytes and AsPixels traits
May 23, 2024
The only issue is that bytemuck's syntax is more verbose, since cast_slice() etc are not trait methods, but standalone functions in the bytemuck crate.
I don't see the utility of the
ComponentBytes
andAsPixels
traits compared to a user simply usingbytemuck
'scast_slice()
andcast_slice_mut()
methods. This could easily be achieved by optionally implementingbytemuck::Pod
for all the pixel structs. Then a user could enable that crate-feature and usebytemuck
to do conversions as they need.In addition, having an crate-local implementation has had soundness flaws in the past in #35 so removing it would reduce that risk.
The text was updated successfully, but these errors were encountered: