| ... | @@ -34,11 +34,11 @@ pub fn addSentinel(alloc: *std.mem.Allocator, comptime T: type, input: []const T | ... | @@ -34,11 +34,11 @@ pub fn addSentinel(alloc: *std.mem.Allocator, comptime T: type, input: []const T |
| 34 | | 34 | |
| 35 | const alphabet = "0123456789abcdefghijklmnopqrstuvwxyz"; | 35 | const alphabet = "0123456789abcdefghijklmnopqrstuvwxyz"; |
| 36 | | 36 | |
| 37 | pub fn randomSlice(alloc: *std.mem.Allocator, rand: *std.rand.Random, comptime T: type, len: usize) ![]T { | 37 | pub fn randomSlice(alloc: *std.mem.Allocator, rand: *const std.rand.Random, comptime T: type, len: usize) ![]T { |
| 38 | var buf = try alloc.alloc(T, len); | 38 | var buf = try alloc.alloc(T, len); |
| 39 | var i: usize = 0; | 39 | var i: usize = 0; |
| 40 | while (i < len) : (i += 1) { | 40 | while (i < len) : (i += 1) { |
| 41 | buf[i] = alphabet[rand.int(usize) % alphabet.len]; | 41 | buf[i] = alphabet[rand.int(u8) % alphabet.len]; |
| 42 | } | 42 | } |
| 43 | return buf; | 43 | return buf; |
| 44 | } | 44 | } |