format: remove extra spaces from error output

This commit is contained in:
iff 2023-07-31 11:03:50 +02:00
parent b16dc1dd5b
commit ee7e6886b9
3 changed files with 15 additions and 5 deletions

View file

@ -49,7 +49,11 @@ fn gen_string_hashmap(rules: Vec<Rule>) -> String {
.iter()
.map(|x| x.to_lowercase())
.collect::<Vec<String>>();
let suggest = match_err.suggest;
let suggest = match_err.
suggest
.iter()
.map(|x| x.to_lowercase())
.collect::<Vec<String>>();
string_hashmap.push_str(&format!(
"(vec![\"{}\"], vec![\"{}\"]),",
pattern.join("\", \""),