refactor to use Packages more and fix PartialEq,Ord impls on Package to all be consistent with each other

This commit is contained in:
ripytide
2024-04-25 14:11:19 +01:00
parent 0c38728e14
commit 536c670e0d
16 changed files with 81 additions and 90 deletions
+3 -3
View File
@@ -54,7 +54,7 @@ impl Backend for Debian {
Ok(result)
}
fn make_dependency(&self, packages: &[Package]) -> Result<()> {
fn make_dependency(&self, packages: &Packages) -> Result<()> {
let mut cmd = build_base_command_with_privileges("apt-mark");
cmd.arg("auto");
for p in packages {
@@ -65,7 +65,7 @@ impl Backend for Debian {
}
/// Install the specified packages.
fn install_packages(&self, packages: &[Package], noconfirm: bool) -> Result<()> {
fn install_packages(&self, packages: &Packages, noconfirm: bool) -> Result<()> {
let backend_info = self.backend_info();
let mut cmd = build_base_command_with_privileges(&backend_info.binary);
@@ -84,7 +84,7 @@ impl Backend for Debian {
}
/// Remove the specified packages.
fn remove_packages(&self, packages: &[Package], noconfirm: bool) -> Result<()> {
fn remove_packages(&self, packages: &Packages, noconfirm: bool) -> Result<()> {
let backend_info = self.backend_info();
let mut cmd = build_base_command_with_privileges(&backend_info.binary);