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
@@ -61,7 +61,7 @@ impl Backend for Flatpak {
}
/// 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(backend_info.binary);
@@ -79,12 +79,12 @@ impl Backend for Flatpak {
run_external_command(cmd)
}
fn make_dependency(&self, _: &[Package]) -> Result<()> {
fn make_dependency(&self, _: &Packages) -> Result<()> {
panic!("not supported by {}", self.backend_info().binary)
}
/// 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 = Command::new(backend_info.binary);