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

feat: Make utility modules public #75

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

secretshardul
Copy link

Makes the function build_binary_checker() and modules checker, error, finder and helper public.

Context, I wish to run which_all() with a custom path. As you see env::var_os("PATH") is a hardcoded value. A clean solution without breaking changes is to expose low level utilities.

    let binary_checker = build_binary_checker();

    let finder = Finder::new();

    finder.find(
        binary_name,
        env::var_os("PATH"),
        Option::<&Path>::None,
        binary_checker,
    )

@Xaeroxe
Copy link
Collaborator

Xaeroxe commented Sep 5, 2023

You can meet your use case with which_in_all. Do you still feel the need to expose the utilities?

@Xaeroxe
Copy link
Collaborator

Xaeroxe commented Sep 5, 2023

Also consider WhichConfig

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