major overhaul of Backend from dynamic to static dispatch using an big enum

This commit is contained in:
ripytide
2024-04-22 14:08:53 +01:00
parent 636a7a02ec
commit df5b229d23
36 changed files with 382 additions and 590 deletions
+13 -9
View File
@@ -12,7 +12,19 @@ use crate::{Group, Package};
#[derive(Debug, Clone)]
pub struct Debian {
pub(crate) packages: HashSet<Package>,
pub packages: HashSet<Package>,
}
impl Debian {
pub fn new() -> Self {
Self {
packages: HashSet::new(),
}
}
}
impl Default for Debian {
fn default() -> Self {
Self::new()
}
}
const BINARY: Text = "apt";
@@ -94,11 +106,3 @@ impl Backend for Debian {
run_external_command(cmd)
}
}
impl Debian {
pub(crate) fn new() -> Self {
Self {
packages: HashSet::new(),
}
}
}