From a5de77af4dcbd6241a692781fb50836174ba771e Mon Sep 17 00:00:00 2001 From: rleungx Date: Tue, 15 May 2018 01:49:00 +0800 Subject: [PATCH] address comment --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 872c41d3..6470622a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -227,7 +227,7 @@ fn run() -> Result<()> { if app.matches.is_present("list-languages") { let mut languages = assets.syntax_set.syntaxes().to_owned(); - languages.sort_by(|a, b| a.name.to_uppercase().cmp(&b.name.to_uppercase())); + languages.sort_by_key(|lang| lang.name.to_uppercase()); let longest = languages .iter()