Why can I compare a String to a &str using if, but not when using match?
I want to know why the comparison works when if but not using match. It’s not so much about if and more because you’ve used == in the condition. The condition in an if statement is any expression of type bool; you just happen to have chosen to use == there. The == operator is … Read more