checker: allow EnumName(number) casts only inside unsafe{} blocks (#15932)

This commit is contained in:
Swastik Baranwal 2022-10-03 01:09:11 +05:30 committed by GitHub
parent 7993f0bf39
commit b584e1df98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 129 additions and 97 deletions

View file

@ -768,7 +768,7 @@ fn (mut app App) next_theme() {
[inline]
fn (mut app App) next_tile_format() {
app.tile_format = TileFormat(int(app.tile_format) + 1)
app.tile_format = unsafe { TileFormat(int(app.tile_format) + 1) }
if app.tile_format == .end_ {
app.tile_format = .normal
}