I have a string where I want to check if it's a semicolon, comma or colon. If it's not any of those, I don't want to do anything:
match token.as_ref() {
";" => semicolons += 1,
"," => commas += 1,
":" => colons += 1,
_ => println!(""),
}
This works, but I don't really want to print a bunch of empty lines (cause a lot of the tokens don't match these criteria).
What would be the most correct way to solve this?