mirror of
https://github.com/rclone/rclone.git
synced 2025-08-09 13:55:15 +02:00
refactor: replace min/max helpers with built-in min/max
We upgraded our minimum Go version in commit ca24447090
. We can now use
the built-in `min` and `max` functions directly.
Reference: https://go.dev/ref/spec#Min_and_max
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This commit is contained in:
committed by
Nick Craig-Wood
parent
e0b08883cb
commit
d1c84f9115
@ -36,20 +36,6 @@ func (r *Range) Clip(offset int64) {
|
||||
}
|
||||
}
|
||||
|
||||
func min(a, b int64) int64 {
|
||||
if a < b {
|
||||
return a
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func max(a, b int64) int64 {
|
||||
if a > b {
|
||||
return a
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// Intersection returns the common Range for two Range~s
|
||||
//
|
||||
// If there is no intersection then the Range returned will have
|
||||
|
Reference in New Issue
Block a user