Compare commits

...

2 commits

Author SHA1 Message Date
5e6044eaf5
fix cfg feature switches 2024-08-25 09:23:15 -04:00
302ba98cbd
remove feature toggles (use cargo run options instead) 2024-08-25 09:22:50 -04:00
2 changed files with 3 additions and 6 deletions

View file

@ -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 = []

View file

@ -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<Instrument>,
#[cfg(save)]
#[cfg(feature = "save")]
#[arg(short, long)]
output: Option<PathBuf>,
#[cfg(play)]
#[cfg(feature = "play")]
#[arg(short, long)]
silent: bool,
score: Score,