alphametics: Use `starts_with`
Clippy suggested:
warning: you should use the `starts_with` method
= help: for further information visit
@@ -47,7 +47,7 @@ fn test_equation(puzzle: &str, substitutions: &HashMap<char, u8>) -> bool {
// Split this into the numbers and check every number's first character
let no_leading_zeroes = just_numbers
.split_whitespace()
- .all(|number| number.chars().next().unwrap() != '0');
+ .all(|number| !number.starts_with('0'));
// Return true if left and right side is equal and the equation doesnt
// contain leading zeroes.
