From fa379a2fa730c495e30d564a95d6a3223b00c5fc Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sun, 7 Aug 2016 15:11:48 +0200 Subject: [PATCH] Only return subcommand name --- bin/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/src/main.rs b/bin/src/main.rs index 03cedd72..d40a022b 100644 --- a/bin/src/main.rs +++ b/bin/src/main.rs @@ -84,7 +84,7 @@ fn get_commands() -> Vec { .filter_map(|path| { path.file_name() .to_str() - .and_then(|s| s.splitn(2, "-").nth(1).map(|s| format!("imag {}", s))) + .and_then(|s| s.splitn(2, "-").nth(1).map(String::from)) }) .collect() })