Skip to content

Clean up Repo::new() function and add correct URL parsing for repositories in /etc/pkg.d (TODO item)

Daniel Kavanagh requested to merge danno131313/pkgutils:CleanUpRepoNew into master

Hi, this is my first contribution so please let me know if anything I did is wrong, I followed the contribution guide as closely as possible.

This merge request is just to address the TODO item in pkgutils src/lib.rs needing a cleanup of the Repo::new() function, which was previously reading every line of every file in /etc/pkg.d and adding it as a remote repo if it didn't start with a #. The nested if statements have been replaced with easy-to-read iterator combinators and the URL parsing is now done correctly with the url crate.

Merge request reports