mirror of
https://codeberg.org/ziglings/exercises.git
synced 2026-06-08 07:50:00 +00:00
fix: use new randomness api
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user