From 0e7b6f25b3fa43d9ad74a6025a3d6d9d37dede66 Mon Sep 17 00:00:00 2001 From: greg Date: Sat, 9 Dec 2017 18:19:07 -0800 Subject: [PATCH] Can specify language name with -l in any case --- schala-lib/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schala-lib/src/lib.rs b/schala-lib/src/lib.rs index d5e32aa..4fc882a 100644 --- a/schala-lib/src/lib.rs +++ b/schala-lib/src/lib.rs @@ -60,7 +60,7 @@ pub fn schala_main(generators: Vec) { let language_names: Vec = languages.iter().map(|lang| {lang.get_language_name()}).collect(); let initial_index: usize = option_matches.opt_str("lang") - .and_then(|lang| { language_names.iter().position(|x| { *x == lang }) }) + .and_then(|lang| { language_names.iter().position(|x| { x.to_lowercase() == lang.to_lowercase() }) }) .unwrap_or(0); let mut options = EvalOptions::default();