Do not put a leading space in the log

This commit is contained in:
Matthias Beyer 2018-02-06 20:54:11 +01:00
parent 3b138ba881
commit 88b7b43d2c

View file

@ -183,8 +183,11 @@ fn get_log_text(rt: &Runtime) -> String {
rt.cli() rt.cli()
.values_of("text") .values_of("text")
.unwrap() // safe by clap .unwrap() // safe by clap
.fold(String::with_capacity(500), |mut acc, e| { .enumerate()
.fold(String::with_capacity(500), |mut acc, (n, e)| {
if n != 0 {
acc.push_str(" "); acc.push_str(" ");
}
acc.push_str(e); acc.push_str(e);
acc acc
}) })