remove duplicate method
This commit is contained in:
@@ -50,6 +50,7 @@ impl ToDoPerBackend {
|
|||||||
if packages.is_empty() {
|
if packages.is_empty() {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
let exit_status = func(&**backend, packages).with_context(|| {
|
let exit_status = func(&**backend, packages).with_context(|| {
|
||||||
format!("{verb_continuous} packages for {}", backend.get_binary())
|
format!("{verb_continuous} packages for {}", backend.get_binary())
|
||||||
})?;
|
})?;
|
||||||
@@ -62,10 +63,6 @@ impl ToDoPerBackend {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn is_empty(&self) -> bool {
|
|
||||||
self.0.iter().all(|(_, packages)| packages.is_empty())
|
|
||||||
}
|
|
||||||
|
|
||||||
pub(crate) fn show(&self, keyword: Option<&str>) {
|
pub(crate) fn show(&self, keyword: Option<&str>) {
|
||||||
for (backend, packages) in self.iter() {
|
for (backend, packages) in self.iter() {
|
||||||
if packages.is_empty() {
|
if packages.is_empty() {
|
||||||
|
|||||||
+1
-1
@@ -172,7 +172,7 @@ impl Pacdef {
|
|||||||
fn clean_packages(mut self) -> Result<()> {
|
fn clean_packages(mut self) -> Result<()> {
|
||||||
let to_remove = self.get_unmanaged_packages();
|
let to_remove = self.get_unmanaged_packages();
|
||||||
|
|
||||||
if to_remove.is_empty() {
|
if to_remove.nothing_to_do_for_all_backends() {
|
||||||
println!("nothing to do");
|
println!("nothing to do");
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user