mirror of
https://codeberg.org/ziglings/exercises.git
synced 2026-06-08 07:50:00 +00: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:
@@ -53,8 +53,8 @@ const AntOrBee = enum { a, b };
|
||||
|
||||
pub fn main() void {
|
||||
// We'll just make one bee and one ant to test them out:
|
||||
var ant = Insect{ .still_alive = true };
|
||||
var bee = Insect{ .flowers_visited = 15 };
|
||||
const ant = Insect{ .still_alive = true };
|
||||
const bee = Insect{ .flowers_visited = 15 };
|
||||
|
||||
std.debug.print("Insect report! ", .{});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user