mirror of
https://git.aramjonghu.dev/AramJonghu/ziglings.git
synced 2026-09-04 09:23:29 +02:00
Converted var to const if there is no mutation in var.
This is checked from compiler version 0.12.0-dev.1664
This commit is contained in:
@@ -96,7 +96,7 @@ const Insect = union(enum) {
|
||||
};
|
||||
|
||||
pub fn main() !void {
|
||||
var my_insects = [_]Insect{
|
||||
const my_insects = [_]Insect{
|
||||
Insect{ .ant = Ant{ .still_alive = true } },
|
||||
Insect{ .bee = Bee{ .flowers_visited = 17 } },
|
||||
Insect{ .grasshopper = Grasshopper{ .distance_hopped = 32 } },
|
||||
|
||||
Reference in New Issue
Block a user