fix(debian): build against rust-apt-0.7.0

1bcb7f8 bumped rust-apt from 0.5 to 0.7. This change made
Cache::packages(&self, &sort) a fallible function. The required change in
the Debian backend was missed.

This commit propagates the error in get_all_installed_packages and
get_explicitly_installed_packages for the Debian backend.

Fixes #64.
This commit is contained in:
steven-omaha
2024-03-26 14:22:00 +01:00
parent 4b7a497dda
commit 3f8468c660
@@ -34,7 +34,7 @@ impl Backend for Debian {
let sort = PackageSort::default().installed();
let mut result = HashSet::new();
for pkg in cache.packages(&sort) {
for pkg in cache.packages(&sort)? {
result.insert(Package::from(pkg.name().to_string()));
}
Ok(result)
@@ -45,7 +45,7 @@ impl Backend for Debian {
let sort = PackageSort::default().installed().manually_installed();
let mut result = HashSet::new();
for pkg in cache.packages(&sort) {
for pkg in cache.packages(&sort)? {
result.insert(Package::from(pkg.name().to_string()));
}
Ok(result)