Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/// An implementation of the Boyer-Moore-Horspool algorithm, for string-specific
/// searching.
struct SubstringSearcher: Sequence, IteratorProtocol {
typealias Element = Range<String.Index>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May as well change Range<String.Index> below to Element also

struct State {
let badCharacterOffsets: [Character: Int]
let patternCount: Int
Expand Down