aboutsummaryrefslogtreecommitdiff
path: root/exercises/016_for2.zig
diff options
context:
space:
mode:
authorlording <[email protected]>2023-06-22 09:41:41 +0000
committerlording <[email protected]>2023-06-22 09:41:41 +0000
commitd2d3dfa277e7d2a22ebbaf9b47316363035ed500 (patch)
tree95b679455dcbb501f0a65d76fe7bc2b73a1ee32a /exercises/016_for2.zig
parentf09a87c348bafb134e3f5eca0ef654cc2a20ceef (diff)
downloadziglings-d2d3dfa277e7d2a22ebbaf9b47316363035ed500.tar.xz
ziglings-d2d3dfa277e7d2a22ebbaf9b47316363035ed500.zip
var to const when posssible
Diffstat (limited to 'exercises/016_for2.zig')
-rw-r--r--exercises/016_for2.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/exercises/016_for2.zig b/exercises/016_for2.zig
index 6fbdb2a..0eda182 100644
--- a/exercises/016_for2.zig
+++ b/exercises/016_for2.zig
@@ -29,7 +29,7 @@ pub fn main() void {
// Note that we convert the usize i to a u32 with
// @intCast(), a builtin function just like @import().
// We'll learn about these properly in a later exercise.
- var place_value = std.math.pow(u32, 2, @intCast(u32, i));
+ const place_value = std.math.pow(u32, 2, @intCast(u32, i));
value += place_value * bit;
}