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

Make MatchOptions::new const #102

Open
kangalio opened this issue Dec 22, 2020 · 1 comment
Open

Make MatchOptions::new const #102

kangalio opened this issue Dec 22, 2020 · 1 comment

Comments

@kangalio
Copy link

Little quality of life change that would allow you to create static glob configurations for use throughout the program, like this

pub const CASE_INSENSITIVE_GLOB: glob::MatchOptions = glob::MatchOptions {
    case_sensitive: false,
    ..glob::MatchOptions::new()
};

glob::glob_with("...", CASE_INSENSITIVE_GLOB)

Of course you can easily work around this by manually specifying all the fields. It would be convenient to be able to fill in default values, though :)

@KodrAus
Copy link
Contributor

KodrAus commented Jan 8, 2021

This sounds good to me! We currently test this crate against 1.23.0, but that release is very old, so I'd be ok with bumping it to support const fn.

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

No branches or pull requests

2 participants