~kb/wyhash

e6db5f8fdc2500931d34faf00375373131647aaa — kb 3 years ago 5e8dec0 main
Simplify output for UInt's
1 files changed, 1 insertions(+), 3 deletions(-)

M src/wyrand.cr
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}}