diff options
| author | Chris Boesch <chrboesch@noreply.codeberg.org> | 2023-06-22 16:51:03 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-22 16:51:03 +0200 |
| commit | 2705e16c364f6a224e418fa895b9a60246a8bad0 (patch) | |
| tree | 03e0207438be1b335d9121dd1bf6f974e2c2b0c3 /patches | |
| parent | 9499e12469c7ebc481f73280f7a678415f44561b (diff) | |
| parent | d52f360731fcfaf47818addfd61332bf0c0e39a5 (diff) | |
Merge pull request #329 from lorrding/refactor-var-to-const
Change `var` to `const` in some exercises
Diffstat (limited to 'patches')
| -rw-r--r-- | patches/patches/010_if2.patch | 4 | ||||
| -rw-r--r-- | patches/patches/023_errors3.patch | 4 | ||||
| -rw-r--r-- | patches/patches/045_optionals.patch | 4 | ||||
| -rw-r--r-- | patches/patches/060_floats.patch | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/patches/patches/010_if2.patch b/patches/patches/010_if2.patch index e78f644..3ce48c2 100644 --- a/patches/patches/010_if2.patch +++ b/patches/patches/010_if2.patch @@ -1,4 +1,4 @@ 13c13 -< var price: u8 = if ???; +< const price: u8 = if ???; --- -> var price: u8 = if (discount) 17 else 20; +> const price: u8 = if (discount) 17 else 20; diff --git a/patches/patches/023_errors3.patch b/patches/patches/023_errors3.patch index a850116..9068e4a 100644 --- a/patches/patches/023_errors3.patch +++ b/patches/patches/023_errors3.patch @@ -1,7 +1,7 @@ 15c15 -< var b: u32 = addTwenty(4) ??? 22; +< const b: u32 = addTwenty(4) ??? 22; --- -> var b: u32 = addTwenty(4) catch 22; +> const b: u32 = addTwenty(4) catch 22; 22c22 < fn addTwenty(n: u32) ??? { --- diff --git a/patches/patches/045_optionals.patch b/patches/patches/045_optionals.patch index c945b5a..f1b9ddd 100644 --- a/patches/patches/045_optionals.patch +++ b/patches/patches/045_optionals.patch @@ -1,4 +1,4 @@ 32c32 -< var answer: u8 = result; +< const answer: u8 = result; --- -> var answer: u8 = result orelse 42; +> const answer: u8 = result orelse 42; diff --git a/patches/patches/060_floats.patch b/patches/patches/060_floats.patch index d20986e..38ebb41 100644 --- a/patches/patches/060_floats.patch +++ b/patches/patches/060_floats.patch @@ -1,4 +1,4 @@ 43c43 -< var shuttle_weight: f16 = 907.18 * 2200; +< const shuttle_weight: f16 = 907.18 * 2200; --- -> var shuttle_weight: f32 = 907.18 * 2200.0; +> const shuttle_weight: f32 = 907.18 * 2200.0; |
