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

impl Default for RegexSet #906

Closed
wants to merge 1 commit into from

Conversation

sourcefrog
Copy link
Contributor

Fixes #905

BurntSushi pushed a commit that referenced this pull request Mar 4, 2023
This is justified by the fact that a RegexSet is, after all, a set. And
a set has a very obvious default value: the empty set. Plus, this is
exactly what you get by passing a default `Vec` or an empty iterator to
the `RegexSet::new` constructor.

We specifically do not add a `Default` impl for Regex because it has no
obvious default value.

Fixes #905, Closes #906
BurntSushi pushed a commit that referenced this pull request Mar 21, 2023
This is justified by the fact that a RegexSet is, after all, a set. And
a set has a very obvious default value: the empty set. Plus, this is
exactly what you get by passing a default `Vec` or an empty iterator to
the `RegexSet::new` constructor.

We specifically do not add a `Default` impl for Regex because it has no
obvious default value.

Fixes #905, Closes #906
BurntSushi pushed a commit that referenced this pull request Apr 15, 2023
This is justified by the fact that a RegexSet is, after all, a set. And
a set has a very obvious default value: the empty set. Plus, this is
exactly what you get by passing a default `Vec` or an empty iterator to
the `RegexSet::new` constructor.

We specifically do not add a `Default` impl for Regex because it has no
obvious default value.

Fixes #905, Closes #906
BurntSushi pushed a commit that referenced this pull request Apr 17, 2023
This is justified by the fact that a RegexSet is, after all, a set. And
a set has a very obvious default value: the empty set. Plus, this is
exactly what you get by passing a default `Vec` or an empty iterator to
the `RegexSet::new` constructor.

We specifically do not add a `Default` impl for Regex because it has no
obvious default value.

Fixes #905, Closes #906
@sourcefrog
Copy link
Contributor Author

Thank you!

@sourcefrog sourcefrog deleted the regexset-default branch April 18, 2023 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

impl Default for RegexSet?
2 participants