3 ms·
I played around with a few different configurations for that particular part, even having something similar to yours that looked like match line.chars().next
by PudgePacket 12y ago
I played around with a few different configurations for that particular part, even having something similar to yours that looked like
match line.chars().next() {
Some(x) => match x {
'#' => ...
'v' => ...
_ => ...
},
None => ...
}
But I felt that the current approach was fine. At this point it becomes more a decision of style and taste vs any kind of practicality.