checker: only allow &u8 with byteptr and itself (#18146)

This commit is contained in:
Swastik Baranwal 2023-05-11 13:58:49 +05:30 committed by GitHub
parent a87f2d9d11
commit d8cf65df1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 28 additions and 3 deletions

View file

@ -59,6 +59,6 @@ fn frame(mut app App) {
fn (mut app App) draw() {
mut istream_image := app.gg.get_cached_image_by_idx(app.iidx)
istream_image.update_pixel_data(&app.pixels[0])
istream_image.update_pixel_data(unsafe { &u8(&app.pixels[0]) })
app.gg.draw_image(0, 0, app.args.grid.width, app.args.grid.height, istream_image)
}