From 4389b24732d20534e0215a273ab89b8643aa0697 Mon Sep 17 00:00:00 2001 From: Nate Cook Date: Fri, 13 Nov 2020 10:30:32 -0600 Subject: [PATCH] Remove configuration option for overlapping --- Sources/Algorithms/FindRange.swift | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Sources/Algorithms/FindRange.swift b/Sources/Algorithms/FindRange.swift index 97e342b..8ad0f7b 100644 --- a/Sources/Algorithms/FindRange.swift +++ b/Sources/Algorithms/FindRange.swift @@ -16,7 +16,7 @@ public struct SubSequenceFinder internal var other: Other internal var firstRange: Range? - internal init(base: Base, other: Other, allowingOverlaps: Bool) { + internal init(base: Base, other: Other) { self.base = base self.other = other self.firstRange = base.firstRange(of: other) @@ -118,11 +118,10 @@ extension Collection where Element: Equatable { return nil } - public func allRanges( - of other: Other, - allowingOverlaps: Bool = true) -> SubSequenceFinder + public func allRanges(of other: Other) + -> SubSequenceFinder { - SubSequenceFinder(base: self, other: other, allowingOverlaps: allowingOverlaps) + SubSequenceFinder(base: self, other: other) } }