INNER CODE UNIT · Rust
run
ngless-toolkit/ngless · src/lib.rs:153
pub fn run<I, S>(args: I) -> i32
where
I: IntoIterator<Item = S>,
S: AsRef<str>,
{
let args: Vec<String> = args.into_iter().map(|s| s.as_ref().to_string()).collect();
// Informational `infoOption`s, matching the Haskell CLI (Execs/Main.hs). These short-circuit at
// any position, regardless of mode, so they are scanned before mode dispatch.
for a in &args {
match a.as_str() {
"-V" | "--version" => {
println!("{}", version::version_line());
return 0;
}
"--version-short" => {
println!("{}", version::VERSION_STR);
return 0;