This commit is contained in:
steven-omaha
2023-01-11 13:50:39 +01:00
parent af8172690a
commit 701eeab9c5
2 changed files with 11 additions and 24 deletions
+7 -3
View File
@@ -34,14 +34,18 @@ impl ToDoPerBackend {
self.0.iter().all(|(_, packages)| packages.is_empty())
}
pub(crate) fn show(&self) {
pub(crate) fn show(&self, keyword: Option<&str>) {
for (backend, packages) in self.iter() {
if packages.is_empty() {
continue;
}
println!("{}", backend.get_section());
if let Some(kw) = keyword {
println!("Would {kw} the following packages:");
}
println!("[{}]", backend.get_section());
for package in packages {
println!(" {package}");
println!("{package}");
}
}
}