From 680e2913f7dc6b6b242e74fd99472b24d57ea3ae Mon Sep 17 00:00:00 2001 From: Dave Gauer Date: Wed, 30 Jun 2021 19:00:50 -0400 Subject: unused consts now errors --- exercises/051_values.zig | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'exercises') diff --git a/exercises/051_values.zig b/exercises/051_values.zig index 956b742..f2653f9 100644 --- a/exercises/051_values.zig +++ b/exercises/051_values.zig @@ -69,17 +69,12 @@ pub fn main() void { .gold = 30, }; - // However, this "skull_farmer" character will be put in the - // global immutable data even though it's defined in a function. - // Since it's immutable, all invocations of the function can share - // this one value. - - const skull_farmer = Character{}; - - // The "reward_xp" value is interesting. It's a constant value, so - // it could go with other global data. But being such a small - // value, it may also simply be inlined as a literal value in your - // instruction code where it is used. It's up to the compiler. + // The "reward_xp" value is interesting. It's an immutable + // value, so even though it is local, it can be put in global + // data and shared between all invocations. But being such a + // small value, it may also simply be inlined as a literal + // value in your instruction code where it is used. It's up + // to the compiler. const reward_xp: u32 = 200; -- cgit v1.2.3-ZIG