INNER CODE UNIT · Rust
check_tools
ngless-toolkit/ngless · src/lib.rs:323
fn check_tools<'a>(
tools: impl Iterator<Item = (&'a str, bool, errors::NgResult<String>)>,
verbose: bool,
) -> i32 {
let mut ok = true;
for (name, required, resolved) in tools {
match resolved {
Ok(path) => {
if verbose {
println!("{name}: {path}");
}
}
Err(e) => {
let msg = e.message.replace('\n', " ");
if required {
eprintln!("Error: {msg}");
ok = false;
} else {