From 302ba98cbdf5731ec3ade81d10157e018bc36849 Mon Sep 17 00:00:00 2001 From: p6nj Date: Sun, 25 Aug 2024 09:22:50 -0400 Subject: [PATCH 1/2] remove feature toggles (use `cargo run` options instead) --- Cargo.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8291a4b..bca068d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,9 +11,6 @@ fasteval = "0.2.4" tinyaudio = { version = "0.1", optional = true } [features] -# default = [] -# default = ["save"] -# default = ["play"] default = ["play", "save"] play = ["dep:tinyaudio"] save = [] From 5e6044eaf51b4caef420029928ceae143b8ffcd6 Mon Sep 17 00:00:00 2001 From: p6nj Date: Sun, 25 Aug 2024 09:23:15 -0400 Subject: [PATCH 2/2] fix cfg feature switches --- src/cli.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index e09a10b..ea8bb94 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -1,6 +1,6 @@ use std::{fs::read_to_string, ops::Deref, path::Path, str::FromStr}; cfg_if! { - if #[cfg(save)] { + if #[cfg(feature = "save")] { use std::path::PathBuf; } } @@ -14,10 +14,10 @@ use clap::Parser; pub(super) struct Args { #[arg(short, long, value_parser = Instrument::from_str)] instrument: Option, - #[cfg(save)] + #[cfg(feature = "save")] #[arg(short, long)] output: Option, - #[cfg(play)] + #[cfg(feature = "play")] #[arg(short, long)] silent: bool, score: Score,