This commit is contained in:
brevalferrari 2025-06-04 12:33:58 +02:00
parent 788eebaea5
commit 17525717e8

View file

@ -46,7 +46,7 @@ fn main() -> anyhow::Result<()> {
.map_err(|e| anyhow!("{e}")) .map_err(|e| anyhow!("{e}"))
.context("Failed to parse input")?; .context("Failed to parse input")?;
debug!("found {} tokens", tokens.as_ref().len()); debug!("found {} tokens", tokens.as_ref().len());
if tokens.as_ref().len() == 0 { if tokens.as_ref().is_empty() {
warn!("0 tokens parsed"); warn!("0 tokens parsed");
} }
@ -56,7 +56,7 @@ fn main() -> anyhow::Result<()> {
'n', 'n',
opts.variables() opts.variables()
.map(|(a, b)| (*a, *b)) .map(|(a, b)| (*a, *b))
.chain(default_variables.into_iter()), .chain(default_variables),
opts.instrument().clone(), opts.instrument().clone(),
opts.slopes().map(|(_, (a, b))| (*a, b.clone())), opts.slopes().map(|(_, (a, b))| (*a, b.clone())),
)); ));
@ -68,7 +68,7 @@ fn main() -> anyhow::Result<()> {
.map(Sample::to_sample) .map(Sample::to_sample)
.collect(); .collect();
debug!("result: {} samples", samples.len()); debug!("result: {} samples", samples.len());
if samples.len() == 0 { if samples.is_empty() {
warn!("0 samples generated"); warn!("0 samples generated");
} }