Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

'const expected = [_]u32{ 123, 67, 89, 99 };'

constant array with u32, and let the compiler figure out how many of em there are (i reserve the right to change it in the future)



'const expected: []const u32 = &.{ 123, 67, 89, 99 };' also works.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: