blip as example for docs.rs example scraping
This commit is contained in:
parent
674f7e49d2
commit
e45053eebe
2 changed files with 9 additions and 1 deletions
|
@ -47,3 +47,11 @@ raw = ["raw_audio"]
|
|||
name = "blip"
|
||||
path = "src/cli/main.rs"
|
||||
required-features = ["bin"]
|
||||
|
||||
[[example]]
|
||||
name = "blip"
|
||||
path = "src/cli/main.rs"
|
||||
required-features = ["bin"]
|
||||
|
||||
[lints.rust]
|
||||
missing_docs = "warn"
|
||||
|
|
|
@ -166,7 +166,7 @@ fn parse_and_compile(opts: &PlayOpts) -> anyhow::Result<Vec<f64>> {
|
|||
compiler
|
||||
.compile_all(tokens)
|
||||
.inspect(|v| {
|
||||
let is_nan = |sample| sample.abs().is_nan();
|
||||
let is_nan = |sample: &f64| sample.abs().is_nan();
|
||||
if v.iter().all(is_nan) {
|
||||
error!("🎉 All your samples are NaN, you got yourself a \"Not a Song\" (NaS)!")
|
||||
} else if v.iter().any(is_nan) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue