Rust : How to use `match` to replace nested if/else
When solving errors4.rs exercise of rustlings, I initially used nested if/else.
It helps with readability.
While the solution was correct, clippy suggested following:
help: consider rewriting the
ifchain withmatch:match value.cmp(&0) {...}
I had used match only with various possible values (mostly from Enum) and
thus was unfamiliar with value.cmp(&0) approach.