fix: use new randomness api

This commit is contained in:
itsnoctural
2026-01-09 00:19:24 +02:00
parent 335aaafcff
commit 551008ac19
2 changed files with 7 additions and 3 deletions

View File

@@ -206,7 +206,7 @@ pub fn build(b: *Build) !void {
var prng = std.Random.DefaultPrng.init(blk: {
var seed: u64 = undefined;
try std.posix.getrandom(std.mem.asBytes(&seed));
io.random(std.mem.asBytes(&seed));
break :blk seed;
});
const rnd = prng.random();
@@ -1287,7 +1287,7 @@ const exercises = [_]Exercise{
\\Max difference (new fn): 0.014
,
},
.{ .main_file = "110_quiz9.zig", .output =
.{ .main_file = "110_quiz9.zig", .output =
\\Toggle pins with XOR on PORTB
\\-----------------------------
\\ 1100 // (initial state of PORTB)