mirror of
https://codeberg.org/ziglings/exercises.git
synced 2026-06-08 07:50:00 +00:00
Converted var to const if there is no mutation in var.
This is checked from compiler version 0.12.0-dev.1664
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user