mirror of
https://github.com/minio/minio.git
synced 2025-11-20 09:56:07 -05:00
fix: [minor] Avoid unnecessary typecasting. (#4828)
We don't need to typecast identifiers from their base to type to same type again. This is not a bug and compiler is fine to skip it but it is better to avoid if not needed.
This commit is contained in:
committed by
Dee Koder
parent
7505bac037
commit
2e6ee68409
@@ -117,7 +117,7 @@ func hashOrder(key string, cardinality int) []int {
|
||||
nums := make([]int, cardinality)
|
||||
keyCrc := crc32.Checksum([]byte(key), crc32.IEEETable)
|
||||
|
||||
start := int(uint32(keyCrc)%uint32(cardinality)) | 1
|
||||
start := int(keyCrc%uint32(cardinality)) | 1
|
||||
for i := 1; i <= cardinality; i++ {
|
||||
nums[i-1] = 1 + ((start + i) % cardinality)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user