mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-31 17:51:33 +02:00
refactor: replace min/max helpers with built-in min/max
We can use the built-in `min` and `max` functions since Go 1.21. Reference: https://go.dev/ref/spec#Min_and_max Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This commit is contained in:
@@ -85,9 +85,7 @@ func NewSimpleGraph(g ChannelGraph) (*SimpleGraph, error) {
|
||||
func maxVal(mapping map[int]uint32) uint32 {
|
||||
maxValue := uint32(0)
|
||||
for _, value := range mapping {
|
||||
if maxValue < value {
|
||||
maxValue = value
|
||||
}
|
||||
maxValue = max(maxValue, value)
|
||||
}
|
||||
return maxValue
|
||||
}
|
||||
|
Reference in New Issue
Block a user