Skip to content

Fix return value of match_indices in pattern example #870

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 16, 2022

Conversation

laurmaedje
Copy link
Contributor

The pattern example on Regex assumes that std's match_indices returns a pair of offsets while it actually returns an offset and a matching string slice. This wasn't catched by tests because the example is ignored (it needs nightly).

Copy link
Member

@BurntSushi BurntSushi left a comment

Choose a reason for hiding this comment

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

Thanks!

Although it's likely that I'll probably remove support for this, as I don't think the Pattern feature has any current path to stability.

@BurntSushi BurntSushi merged commit 284d846 into rust-lang:master Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants