diff --git a/Cargo.toml b/Cargo.toml index 3601516..8b5226f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,3 +27,8 @@ path = "crates/main/main.rs" lto = "off" opt-level = "z" strip = true + +[features] +default = [] +debian = ["pacdef_core/debian"] +arch = ["pacdef_core/arch"] diff --git a/crates/pacdef_core/Cargo.toml b/crates/pacdef_core/Cargo.toml index 520a213..f5a9765 100644 --- a/crates/pacdef_core/Cargo.toml +++ b/crates/pacdef_core/Cargo.toml @@ -32,6 +32,6 @@ alpm = { version = "2.2", optional = true } rust-apt = { version = "0.5", optional = true } [features] -default = ["arch"] +default = [] arch = ["dep:alpm"] debian = ["dep:rust-apt"] diff --git a/crates/pacdef_core/src/core.rs b/crates/pacdef_core/src/core.rs index 5050de8..890628f 100644 --- a/crates/pacdef_core/src/core.rs +++ b/crates/pacdef_core/src/core.rs @@ -109,11 +109,14 @@ impl Pacdef { to_install } - #[cfg(feature = "arch")] + #[allow(clippy::unused_self, unused_variables)] fn overwrite_values_from_config(&mut self, backend: &mut dyn Backend) { - if let Some(arch) = backend.as_any_mut().downcast_mut::() { - arch.binary = self.config.aur_helper.clone(); - arch.aur_rm_args = self.config.aur_rm_args.take(); + #[cfg(feature = "arch")] + { + if let Some(arch) = backend.as_any_mut().downcast_mut::() { + arch.binary = self.config.aur_helper.clone(); + arch.aur_rm_args = self.config.aur_rm_args.take(); + } } }