Skip to content

Commit f13558b

Browse files
committed
Modernize
1 parent b8a88b8 commit f13558b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

phonenumbers.go

+1-4
Original file line numberDiff line numberDiff line change
@@ -3380,10 +3380,7 @@ func GetTimezonesForPrefix(number string) ([]string, error) {
33803380
// strip any leading +
33813381
number = strings.TrimLeft(number, "+")
33823382

3383-
matchLength := len(number) // maxLength: min( len(number), timezoneMap.MaxLength )
3384-
if matchLength > timezoneMap.MaxLength {
3385-
matchLength = timezoneMap.MaxLength
3386-
}
3383+
matchLength := min(len(number), timezoneMap.MaxLength)
33873384

33883385
for i := matchLength; i > 0; i-- {
33893386
index, err := strconv.Atoi(number[0:i])

0 commit comments

Comments
 (0)