Skip to content

Commit

Permalink
update for zig changes to std.Random
Browse files Browse the repository at this point in the history
  • Loading branch information
rofrol authored Aug 8, 2024
1 parent f094470 commit a19b54a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/06-heap_memory_and_allocators.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub fn main() !void {
fn getRandomCount() !u8 {
var seed: u64 = undefined;
try std.posix.getrandom(std.mem.asBytes(&seed));
var random = std.rand.DefaultPrng.init(seed);
var random = std.Random.DefaultPrng.init(seed);
return random.random().uintAtMost(u8, 5) + 5;
}
```
Expand Down

0 comments on commit a19b54a

Please sign in to comment.