move add_packages to macro
This commit is contained in:
@@ -33,5 +33,11 @@ macro_rules! impl_backend_constants {
|
||||
self.packages.insert(package.clone());
|
||||
})
|
||||
}
|
||||
|
||||
fn add_packages(&mut self, packages: HashSet<Package>) {
|
||||
for p in packages {
|
||||
self.packages.insert(p);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -25,12 +25,6 @@ impl Backend for Pacman {
|
||||
fn get_explicitly_installed_packages(&self) -> HashSet<Package> {
|
||||
convert_to_pacdef_packages(get_explicitly_installed_packages_from_alpm())
|
||||
}
|
||||
|
||||
fn add_packages(&mut self, packages: HashSet<Package>) {
|
||||
for p in packages {
|
||||
self.packages.insert(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn get_all_installed_packages_from_alpm() -> HashSet<String> {
|
||||
|
||||
@@ -24,12 +24,6 @@ impl Backend for Rust {
|
||||
fn get_explicitly_installed_packages(&self) -> HashSet<Package> {
|
||||
self.get_all_installed_packages()
|
||||
}
|
||||
|
||||
fn add_packages(&mut self, packages: HashSet<Package>) {
|
||||
for p in packages {
|
||||
self.packages.insert(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn run_cargo_install_list() -> String {
|
||||
|
||||
Reference in New Issue
Block a user