Skip to content
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

Add empty() constructor to RegexSet #715

Closed
wants to merge 1 commit into from

Conversation

robjtede
Copy link
Contributor

@robjtede robjtede commented Oct 9, 2020

A slightly nicer constructor for ergonomics. Useful when used as part of a larger builder.

Doctested with is_empty from #687.

BurntSushi pushed a commit that referenced this pull request Oct 11, 2020
This goes nicely with the new 'is_empty' predicate introduced in the
previous commit. It's a bit of a nicer way of building a set with no
regexes instead of the weird `&[""; 0]` or something even stranger since
the RegexSet::new constructor is polymorphic.

Closes #715
@robjtede robjtede deleted the feat/empty-set branch October 12, 2020 01:22
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.

1 participant