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
@@ -74,7 +74,7 @@ impl Backend for Fedora {
}
/// 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 = Command::new("sudo");
@@ -100,7 +100,7 @@ impl Backend for Fedora {
}
/// Show information from package manager for package.
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 = Command::new("sudo");
@@ -128,7 +128,7 @@ impl Backend for Fedora {
run_external_command(cmd)
}
fn make_dependency(&self, _: &[Package]) -> Result<()> {
fn make_dependency(&self, _: &Packages) -> Result<()> {
panic!("Not supported by the package manager!")
}
}