diff options
| author | Chris Boesch <[email protected]> | 2023-06-22 11:25:22 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-06-22 11:25:22 +0200 |
| commit | 40bedacfdf35116d560580210563339a16457679 (patch) | |
| tree | 0c8ec829c817cd38e3560cf67c239baeea54469c | |
| parent | f09a87c348bafb134e3f5eca0ef654cc2a20ceef (diff) | |
| parent | ccb580f95db5024962ff91ef522143646a3d1835 (diff) | |
| download | ziglings-40bedacfdf35116d560580210563339a16457679.tar.xz ziglings-40bedacfdf35116d560580210563339a16457679.zip | |
Merge pull request #327 from lorrding/patch_v0.11.0-dev.3747
Fix breaking change in builtin casts functions
| -rw-r--r-- | exercises/036_enums2.zig | 6 | ||||
| -rw-r--r-- | exercises/096_memory_allocation.zig | 2 | ||||
| -rw-r--r-- | patches/patches/036_enums2.patch | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/exercises/036_enums2.zig b/exercises/036_enums2.zig index 820a71e..1477b20 100644 --- a/exercises/036_enums2.zig +++ b/exercises/036_enums2.zig @@ -57,8 +57,8 @@ pub fn main() void { \\</p> \\ , .{ - @enumToInt(Color.red), - @enumToInt(Color.green), - @enumToInt(???), // Oops! We're missing something! + @intFromEnum(Color.red), + @intFromEnum(Color.green), + @intFromEnum(???), // Oops! We're missing something! }); } diff --git a/exercises/096_memory_allocation.zig b/exercises/096_memory_allocation.zig index 8e348be..7538ba4 100644 --- a/exercises/096_memory_allocation.zig +++ b/exercises/096_memory_allocation.zig @@ -45,7 +45,7 @@ fn runningAverage(arr: []const f64, avg: []f64) void { for (0.., arr) |index, val| { sum += val; - avg[index] = sum / @intToFloat(f64, index + 1); + avg[index] = sum / @floatFromInt(f64, index + 1); } } diff --git a/patches/patches/036_enums2.patch b/patches/patches/036_enums2.patch index c20905a..367b780 100644 --- a/patches/patches/036_enums2.patch +++ b/patches/patches/036_enums2.patch @@ -7,6 +7,6 @@ --- > \\ <span style="color: #{x:0>6}">Blue</span> 62c62 -< @enumToInt(???), // Oops! We're missing something! +< @intFromEnum(???), // Oops! We're missing something! --- -> @enumToInt(Color.blue), // Oops! We're missing something! +> @intFromEnum(Color.blue), // Oops! We're missing something! |
