fix reading group sections
This commit is contained in:
+1
-1
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
@@ -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
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user