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

filter_entry().filter_entry() is broken #192

Open
obsgolem opened this issue Dec 6, 2023 · 2 comments
Open

filter_entry().filter_entry() is broken #192

obsgolem opened this issue Dec 6, 2023 · 2 comments

Comments

@obsgolem
Copy link

obsgolem commented Dec 6, 2023

FilterEntry::filter_entry is parameterized on the global P instead of a new, local P. This means that you can't call filter_entry twice with two different functions.

EDIT:
Minimal repro:

use walkdir::WalkDir;

fn main() {
    let temp = WalkDir::new(".")
        .into_iter()
        .filter_entry(|x| true)
        .filter_entry(|x| true);
}

Playground link

Expected: compiles
Actual: doesn't

@BurntSushi
Copy link
Owner

Please provide a code example. Provide enough instructions and data for me to be able to reproduce the problem you're seeing. Please also state what problem you're trying to solve. Include any relevant input data. Please include actual output and expected output.

@obsgolem
Copy link
Author

obsgolem commented Dec 8, 2023

Updated, sorry.

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