From 0d39219b0a32d3024702da8cba97b67b6558a6a1 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Wed, 24 Apr 2019 09:45:06 +0200 Subject: Add Frontend::compare_packages() --- src/frontend/mod.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/frontend/mod.rs') diff --git a/src/frontend/mod.rs b/src/frontend/mod.rs index 41ab972..0027fd8 100644 --- a/src/frontend/mod.rs +++ b/src/frontend/mod.rs @@ -7,10 +7,12 @@ use crate::config::Configuration; use crate::frontend::list::ListFrontend; use crate::frontend::json::JsonFrontend; use crate::frontend::table::TableFrontend; +use crate::backend::Backend; pub trait Frontend { fn list_packages(&self, packages: Vec) -> Result<()>; fn list_problems(&self, problems: Vec) -> Result<()>; + fn compare_packages(&self, packages: Vec, backend: &Backend, filter_repos: Vec) -> Result<()>; } pub mod list; -- cgit v1.2.3 From fcf973c16d4128dda76b809b0d5b9a2635afae47 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Wed, 24 Apr 2019 09:56:27 +0200 Subject: Add missing "ComparePackage" type Because we cannot build a "Package" from the compare file (because we shouldn't, because we only need _some_ information about the package), we should use a special helper type for deserializing the contents of the file. --- src/frontend/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/frontend/mod.rs') diff --git a/src/frontend/mod.rs b/src/frontend/mod.rs index 0027fd8..43e5b5e 100644 --- a/src/frontend/mod.rs +++ b/src/frontend/mod.rs @@ -7,12 +7,13 @@ use crate::config::Configuration; use crate::frontend::list::ListFrontend; use crate::frontend::json::JsonFrontend; use crate::frontend::table::TableFrontend; +use crate::compare::ComparePackage; use crate::backend::Backend; pub trait Frontend { fn list_packages(&self, packages: Vec) -> Result<()>; fn list_problems(&self, problems: Vec) -> Result<()>; - fn compare_packages(&self, packages: Vec, backend: &Backend, filter_repos: Vec) -> Result<()>; + fn compare_packages(&self, packages: Vec, backend: &Backend, filter_repos: Vec) -> Result<()>; } pub mod list; -- cgit v1.2.3