File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ fn main() {
107
107
] ;
108
108
109
109
// A square is rendered as two triangles (see indices)
110
- // SAFETY: core::mem::offset_of makes sure the offsets are right.
110
+ // SAFETY: core::mem::offset_of makes sure the offsets are right and alignment is respected .
111
111
unsafe {
112
112
canvas. render_geometry_raw (
113
113
& vertices,
@@ -121,7 +121,7 @@ fn main() {
121
121
. expect ( "render_geometry_raw failed (probably unsupported, see error message)" ) ;
122
122
123
123
// Parameters can be reused, here only the positions are swapped out for new ones.
124
- // SAFETY: core::mem::offset_of makes sure the offsets are right.
124
+ // SAFETY: core::mem::offset_of makes sure the offsets are right and alignment is respected .
125
125
// The offset 0 is correct because the element type of positions is `[f32; 2]`.
126
126
unsafe {
127
127
canvas. render_geometry_raw (
You can’t perform that action at this time.
0 commit comments