mirror of
https://codeberg.org/andyscott/ziglings.git
synced 2024-11-09 11:40:46 -05:00
Merge pull request #327 from lorrding/patch_v0.11.0-dev.3747
Fix breaking change in builtin casts functions
This commit is contained in:
commit
40bedacfdf
3 changed files with 6 additions and 6 deletions
|
@ -57,8 +57,8 @@ pub fn main() void {
|
||||||
\\</p>
|
\\</p>
|
||||||
\\
|
\\
|
||||||
, .{
|
, .{
|
||||||
@enumToInt(Color.red),
|
@intFromEnum(Color.red),
|
||||||
@enumToInt(Color.green),
|
@intFromEnum(Color.green),
|
||||||
@enumToInt(???), // Oops! We're missing something!
|
@intFromEnum(???), // Oops! We're missing something!
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ fn runningAverage(arr: []const f64, avg: []f64) void {
|
||||||
|
|
||||||
for (0.., arr) |index, val| {
|
for (0.., arr) |index, val| {
|
||||||
sum += val;
|
sum += val;
|
||||||
avg[index] = sum / @intToFloat(f64, index + 1);
|
avg[index] = sum / @floatFromInt(f64, index + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,6 @@
|
||||||
---
|
---
|
||||||
> \\ <span style="color: #{x:0>6}">Blue</span>
|
> \\ <span style="color: #{x:0>6}">Blue</span>
|
||||||
62c62
|
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!
|
||||||
|
|
Loading…
Reference in a new issue