Skip to content

Replace FragmentScanner with scan(), and turn around the bool#20

Merged
cgwalters merged 1 commit intocoreos:mainfrom
nabijaczleweli:streamline2
Feb 3, 2023
Merged

Replace FragmentScanner with scan(), and turn around the bool#20
cgwalters merged 1 commit intocoreos:mainfrom
nabijaczleweli:streamline2

Conversation

@nabijaczleweli
Copy link
Collaborator

Take base_dirs: IntoIter<AsRef>, shared_path: AsRef, allowed_extensions: &[AsRef]

This makes client code a hell of a lot more flexible, and the arguments make more semantic sense; in particular, it means you can do

for (filename, filepath) in liboverdrop::scan(["/usr/lib", "/run", "/etc"], "my-crate/config.d", &["toml"], false) {
    println!("fragment '{}' located at '{}'", filename, filepath.display());
}

and it Just Works

@cgwalters
Copy link
Member

OK yeah, I'm good with this. I think I'd probably still like a builder-style API potentially but it can be based on top of this later.

However, let's do a semver-compatible release first with the current fixes if that's OK with you?

@nabijaczleweli
Copy link
Collaborator Author

Sure, whatever.

@nabijaczleweli nabijaczleweli force-pushed the streamline2 branch 2 times, most recently from 26408a2 to 8b0b62f Compare February 3, 2023 17:50
Take base_dirs: IntoIter<AsRef<Path>>,
     shared_path: AsRef<Path>,
     allowed_extensions: &[AsRef<OsStr>]

This makes client code a hell of a lot more flexible,
and the arguments make more semantic sense

Closes: coreos#12
@nabijaczleweli
Copy link
Collaborator Author

This is g2g then I think

@cgwalters cgwalters merged commit d51c26d into coreos:main Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-break Change which requires a semver bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants