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

Fixes paths thing #920

Merged
merged 2 commits into from
Dec 4, 2024
Merged

Fixes paths thing #920

merged 2 commits into from
Dec 4, 2024

Conversation

ranjitjhala
Copy link
Contributor

Adds @nilehmann 's deserialize thing

fixes #918

@ranjitjhala
Copy link
Contributor Author

Um ... ok for some odd reason the neg tests are all failing ? Any clue?

@ranjitjhala
Copy link
Contributor Author

@nilehmann ?

@nilehmann
Copy link
Member

calling split(",") on the empty springs results in a vec![""], so the default config always skips everything. To account for possible whitespace:

        let paths = String::deserialize(deserializer)?
            .split(",")
            .map(str::trim)
            .filter(|s| !s.is_empty())
            .map(PathBuf::from)
            .collect();

but also maybe better to make it an Option<Paths> to be more explicit

@ranjitjhala ranjitjhala merged commit 6aa7728 into main Dec 4, 2024
7 checks passed
@ranjitjhala ranjitjhala deleted the check-files-paths branch December 4, 2024 13:58
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.

Simplify check_files
2 participants