-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.hacktoberfesttype/enhancementThe issue or PR belongs to an enhancement.The issue or PR belongs to an enhancement.
Description
Enhancement
like we can use max
rather than
tidb/pkg/util/mathutil/math.go
Lines 71 to 80 in 7158ac6
// Max returns the largest one from its arguments. | |
func Max[T constraints.Ordered](x T, xs ...T) T { | |
maxv := x | |
for _, n := range xs { | |
if n > maxv { | |
maxv = n | |
} | |
} | |
return maxv | |
} |
Metadata
Metadata
Assignees
Labels
good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.hacktoberfesttype/enhancementThe issue or PR belongs to an enhancement.The issue or PR belongs to an enhancement.