mirror of
https://github.com/pgsty/minio.git
synced 2026-10-08 18:55:58 +03:00
simplifying if-else chains to switches (#6208)
This commit is contained in:
+3
-2
@@ -427,9 +427,10 @@ func hashKey(algo string, key string, cardinality int) int {
|
||||
switch algo {
|
||||
case formatXLVersionV2DistributionAlgo:
|
||||
return crcHashMod(key, cardinality)
|
||||
default:
|
||||
// Unknown algorithm returns -1, also if cardinality is lesser than 0.
|
||||
return -1
|
||||
}
|
||||
// Unknown algorithm returns -1, also if cardinality is lesser than 0.
|
||||
return -1
|
||||
}
|
||||
|
||||
// Returns always a same erasure coded set for a given input.
|
||||
|
||||
Reference in New Issue
Block a user