mirror of
https://codeberg.org/ziglings/exercises.git
synced 2026-06-09 16:39:58 +00:00
use const for variables that are never modified
This commit is contained in:
@@ -16,7 +16,7 @@ const MyNumberError = error{
|
||||
const std = @import("std");
|
||||
|
||||
pub fn main() void {
|
||||
var nums = [_]u8{ 2, 3, 4, 5, 6 };
|
||||
const nums = [_]u8{ 2, 3, 4, 5, 6 };
|
||||
|
||||
for (nums) |n| {
|
||||
std.debug.print("{}", .{n});
|
||||
|
||||
Reference in New Issue
Block a user