We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b91918 commit ea57d6eCopy full SHA for ea57d6e
src/expression.rs
@@ -195,7 +195,7 @@ impl<'a> Tree<'a> {
195
pub fn parse_num(s: &str) -> Result<u32, Error> {
196
if s.len() > 1 {
197
let ch = s.chars().next().unwrap();
198
- if ch < '1' || ch > '9' {
+ if !('1'..='9').contains(&ch) {
199
return Err(Error::Unexpected(
200
"Number must start with a digit 1-9".to_string(),
201
));
0 commit comments