From 39a199bb3e70d19e628747120d65f8785b0198eb Mon Sep 17 00:00:00 2001 From: Blake Mizerany Date: Wed, 24 Apr 2024 15:04:41 -0700 Subject: [PATCH] remove duplicate check for ".." --- types/model/name.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/types/model/name.go b/types/model/name.go index 942ee51f1..a7d647e73 100644 --- a/types/model/name.go +++ b/types/model/name.go @@ -205,7 +205,7 @@ func MustParseName(s, fill string) Name { // // The returned Name will only be valid if dst is valid. // -// It skipps fill parts that are "?". +// It skips fill parts that are "?". func fillName(r Name, fill string) Name { fill = cmp.Or(fill, FillDefault) f := parseMask(fill) @@ -479,7 +479,6 @@ func parts(s string) iter_Seq2[PartKind, string] { return } - numConsecutiveDots := 0 partLen := 0 state, j := PartDigest, len(s) for i := len(s) - 1; i >= 0; i-- { @@ -551,15 +550,6 @@ func parts(s string) iter_Seq2[PartKind, string] { yield(PartExtraneous, s[i+1:j]) return } - default: - if s[i] == '.' { - if numConsecutiveDots++; numConsecutiveDots > 1 { - yield(state, "") - return - } - } else { - numConsecutiveDots = 0 - } } }