I have code like this:
var random: std.rand.Random = undefined;
pub fn main() !void {
var tt = std.rand.DefaultPrng.init(@intCast(std.time.milliTimestamp()));
random = std.rand.DefaultPrng.init(@intCast(std.time.milliTimestamp())).random();
}
I'd like to inline the creation of tt, but I cannot replace random = tt.random() with random = std.rand.DefaultPrng.init(@intCast(std.time.milliTimestamp())).random(); as this gives me the error "error: expected type '*rand.Xoshiro256', found '*const rand.Xoshiro256'"
Can I somehow avoid it by casting?