diff options
| author | Chris Boesch <[email protected]> | 2023-11-21 15:01:22 +0100 |
|---|---|---|
| committer | Chris Boesch <[email protected]> | 2023-11-21 15:01:22 +0100 |
| commit | 7679f93f688452b2236d20b49f92569b8d56e20d (patch) | |
| tree | 26712b6e6bd28c5a265d9831246e1226f6944c4f /exercises/025_errors5.zig | |
| parent | b7015c2d9d50da77cf1a3897f84e1b736649beef (diff) | |
| download | ziglings-7679f93f688452b2236d20b49f92569b8d56e20d.tar.xz ziglings-7679f93f688452b2236d20b49f92569b8d56e20d.zip | |
Converted var to const if there is no mutation in var.
This is checked from compiler version 0.12.0-dev.1664
Diffstat (limited to 'exercises/025_errors5.zig')
| -rw-r--r-- | exercises/025_errors5.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/exercises/025_errors5.zig b/exercises/025_errors5.zig index 63595b1..94bf1c7 100644 --- a/exercises/025_errors5.zig +++ b/exercises/025_errors5.zig @@ -26,7 +26,7 @@ fn addFive(n: u32) MyNumberError!u32 { // This function needs to return any error which might come back from detect(). // Please use a "try" statement rather than a "catch". // - var x = detect(n); + const x = detect(n); return x + 5; } |
