M src/wyrand.cr => src/wyrand.cr +1 -3
@@ 38,9 38,7 @@ struct Wyrand
{% type = "UInt#{size}".id %}
def rand(type : {{type}}.class) : {{type}}
- r = next_u
- p = pointerof(r).as {{type}}*
- p.value
+ {{type}}.new! next_u
end
private def rand_int(max : {{type}}) : {{type}}