add config (WIP)

This commit is contained in:
timeshifter
2023-01-14 16:56:07 +01:00
parent ce960a4e29
commit 1a9226384a
9 changed files with 122 additions and 7 deletions
+8 -2
View File
@@ -14,18 +14,24 @@ use crate::env::get_single_var;
use crate::path::get_pacdef_group_dir;
use crate::search;
use crate::ui::get_user_confirmation;
use crate::Config;
use crate::Group;
pub struct Pacdef {
args: ArgMatches,
config: Config,
groups: HashSet<Group>,
}
// TODO review
impl Pacdef {
#[must_use]
pub fn new(args: ArgMatches, groups: HashSet<Group>) -> Self {
Self { args, groups }
pub fn new(args: ArgMatches, config: Config, groups: HashSet<Group>) -> Self {
Self {
args,
config,
groups,
}
}
#[allow(clippy::unit_arg)]