Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
akzhan committed Nov 11, 2017
1 parent 2dddae2 commit 43c6611
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/crystal/hasher.cr
Expand Up @@ -132,12 +132,12 @@ struct Crystal::Hasher
permute(value.to_u64)
end

def int(value : Int)
permute(value.remainder(HASH_MODULUS).to_i64.unsafe_as(UInt64))
def int(value : Int::Unsigned)
permute(value.remainder(HASH_MODULUS).to_u64)
end

def int(value : UInt)
permute(value.remainder(HASH_MODULUS).to_u64)
def int(value : Int)
permute(value.remainder(HASH_MODULUS).to_i64.unsafe_as(UInt64))
end

# This function is for reference implementation, and it is used for BigFloat.
Expand Down

0 comments on commit 43c6611

Please sign in to comment.