var to const when posssible
This commit is contained in:
parent
1b1d6b020b
commit
533c8e217d
16 changed files with 27 additions and 27 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue