diff --git a/Source/SwiftLintFramework/Rules/DiscouragedOptionalCollectionRule.swift b/Source/SwiftLintFramework/Rules/DiscouragedOptionalCollectionRule.swift index 52bed16f7..f8849a525 100644 --- a/Source/SwiftLintFramework/Rules/DiscouragedOptionalCollectionRule.swift +++ b/Source/SwiftLintFramework/Rules/DiscouragedOptionalCollectionRule.swift @@ -99,7 +99,7 @@ private extension String { let finalIndex = index(range.upperBound, offsetBy: 1, limitedBy: endIndex), self[range.upperBound] == "?" else { return nil } - return Range(range.lowerBound..").compactMap { range -> Range? in @@ -110,7 +110,7 @@ private extension String { self[initialIndex..