fix reading group sections

This commit is contained in:
steven-omaha
2023-01-10 14:13:36 +01:00
parent 832b94e2dc
commit 7bf464b732
6 changed files with 47 additions and 44 deletions
+1 -1
View File
@@ -103,7 +103,7 @@ pub(crate) trait Backend {
.skip(1)
.filter(|line| !line.starts_with('['))
.fuse()
.map(Package::from)
.filter_map(Package::try_from)
.collect()
}
+1 -1
View File
@@ -47,7 +47,7 @@ fn get_explicitly_installed_packages_from_alpm() -> HashSet<String> {
}
fn convert_to_pacdef_packages(packages: HashSet<String>) -> HashSet<Package> {
packages.into_iter().map(Package::from).collect()
packages.into_iter().filter_map(Package::try_from).collect()
}
impl Pacman {
+1 -1
View File
@@ -17,7 +17,7 @@ impl Backend for Rust {
fn get_all_installed_packages(&self) -> HashSet<Package> {
extract_packages_names(&run_cargo_install_list())
.map(Package::from)
.filter_map(Package::try_from)
.collect()
}