This commit is contained in:
Steven Fackler
2023-02-25 10:10:04 -05:00
parent 4bae134f50
commit 842eacefc8
3 changed files with 4 additions and 4 deletions

View File

@@ -359,7 +359,7 @@ impl<'a> Parser<'a> {
}
fn posit_number(&mut self) -> io::Result<u32> {
let n = self.take_while(|c| matches!(c, '0'..='9'))?;
let n = self.take_while(|c| c.is_ascii_digit())?;
n.parse()
.map_err(|e| io::Error::new(io::ErrorKind::InvalidInput, e))
}