From 57484cd12da017da35e9238765fa4ea5626ee9db Mon Sep 17 00:00:00 2001 From: Lukas Santner Date: Wed, 17 Jul 2024 18:24:47 +0100 Subject: [PATCH] add none feature --- src/feature.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/feature.rs b/src/feature.rs index 43a0a47..8e3d696 100644 --- a/src/feature.rs +++ b/src/feature.rs @@ -7,6 +7,7 @@ pub enum Enabled { MacOS, Linux, Command(String), + None, } #[derive(Debug, serde::Deserialize, Clone)] @@ -19,6 +20,7 @@ pub struct Feature { impl Feature { pub fn enabled(&self) -> bool { match &self.enabled { + Enabled::None => false, Enabled::All => true, Enabled::MacOS => cfg!(target_os = "macos"), Enabled::Linux => cfg!(target_os = "linux"),