reorder Backend methods

This commit is contained in:
Dr. Matthias Ratajczak
2023-01-05 17:59:23 +01:00
parent 265d67089b
commit e873cb979c
2 changed files with 18 additions and 18 deletions
+10 -10
View File
@@ -6,16 +6,6 @@ use crate::Package;
pub struct Rust;
impl Backend for Rust {
fn get_all_installed_packages() -> HashSet<Package> {
extract_packages_names(&run_cargo_install_list())
.map(Package::from)
.collect()
}
fn get_explicitly_installed_packages() -> HashSet<Package> {
Self::get_all_installed_packages()
}
fn get_binary() -> Binary {
"cargo"
}
@@ -27,6 +17,16 @@ impl Backend for Rust {
fn get_switches_remove() -> Switches {
&["uninstall"]
}
fn get_all_installed_packages() -> HashSet<Package> {
extract_packages_names(&run_cargo_install_list())
.map(Package::from)
.collect()
}
fn get_explicitly_installed_packages() -> HashSet<Package> {
Self::get_all_installed_packages()
}
}
fn run_cargo_install_list() -> String {