Only return subcommand name

This commit is contained in:
Matthias Beyer 2016-08-07 15:11:48 +02:00
parent cd70c68a01
commit fa379a2fa7

View file

@ -84,7 +84,7 @@ fn get_commands() -> Vec<String> {
.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()
})