Skip to content

Commit

Permalink
add none feature
Browse files Browse the repository at this point in the history
  • Loading branch information
santikid committed Jul 17, 2024
1 parent 8558259 commit 57484cd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/feature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ pub enum Enabled {
MacOS,
Linux,
Command(String),
None,
}

#[derive(Debug, serde::Deserialize, Clone)]
Expand All @@ -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"),
Expand Down

0 comments on commit 57484cd

Please sign in to comment.