stuff
This commit is contained in:
@@ -65,14 +65,20 @@ impl ToDoPerBackend {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub(crate) fn show(&self) {
|
||||
pub(crate) fn show(&self, indentend: bool) {
|
||||
for (backend, packages) in self.iter() {
|
||||
if packages.is_empty() {
|
||||
continue;
|
||||
}
|
||||
|
||||
println!(" [{}]", backend.get_section());
|
||||
if indentend {
|
||||
print!(" ");
|
||||
}
|
||||
println!("[{}]", backend.get_section());
|
||||
for package in packages {
|
||||
if indentend {
|
||||
print!(" ");
|
||||
}
|
||||
println!(" {package}");
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -97,7 +97,7 @@ impl Pacdef {
|
||||
}
|
||||
|
||||
println!("Would install the following packages:");
|
||||
to_install.show();
|
||||
to_install.show(true);
|
||||
|
||||
if !get_user_confirmation()? {
|
||||
return Ok(());
|
||||
@@ -142,7 +142,7 @@ impl Pacdef {
|
||||
fn show_unmanaged_packages(mut self) {
|
||||
let unmanaged_per_backend = &self.get_unmanaged_packages();
|
||||
|
||||
unmanaged_per_backend.show();
|
||||
unmanaged_per_backend.show(false);
|
||||
}
|
||||
|
||||
fn get_unmanaged_packages(&mut self) -> ToDoPerBackend {
|
||||
@@ -178,7 +178,7 @@ impl Pacdef {
|
||||
}
|
||||
|
||||
println!("Would remove the following packages");
|
||||
to_remove.show();
|
||||
to_remove.show(true);
|
||||
|
||||
if !get_user_confirmation()? {
|
||||
return Ok(());
|
||||
|
||||
Reference in New Issue
Block a user