Skip to content

byte_pattern: share the TwoWaySearcher between byte and str - #135931

Open
folkertdev wants to merge 1 commit into
rust-lang:mainfrom
folkertdev:byte-pattern-two-way-searcher
Open

byte_pattern: share the TwoWaySearcher between byte and str #135931
folkertdev wants to merge 1 commit into
rust-lang:mainfrom
folkertdev:byte-pattern-two-way-searcher

Conversation

@folkertdev

Copy link
Copy Markdown
Contributor

tracking issue: #134149

An attempt to break up #134350 into more manageable pieces.

From what I can see, the TwoWaySearcher implementation does not have special logic for UTF8 boundaries, so it should work just as well on any &[u8]. So this PR just moves the TwoWaySearcher implementation to slice/byte_pattern.rs, and then uses it from str/pattern.rs. No functional changes, no additional API surface.

r? @BurntSushi

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants