File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ pub fn symbol_parser(input: &[u8]) -> IResult<&[u8], Symbol> {
6262// @TODO add negatives
6363/// Parses valid integers
6464/// Example Successes: 1, 2, 4153, -12421
65- pub fn integer ( input : & [ u8 ] ) -> IResult < & [ u8 ] , i32 > {
65+ pub fn integer_parser ( input : & [ u8 ] ) -> IResult < & [ u8 ] , i32 > {
6666 map_res ( take_while1 ( is_digit) , |digits : & [ u8 ] | {
6767 String :: from_utf8 ( digits. to_vec ( ) ) . map ( |digit_string| digit_string. parse :: < i32 > ( ) . unwrap ( ) )
6868 } ) ( input)
@@ -92,7 +92,7 @@ pub fn to_value_parser<I, O: ToValue>(
9292/// Example Failures:
9393/// 1.5, 7.1321 , 1423152621625226126431525
9494pub fn try_read_i32 ( input : & [ u8 ] ) -> IResult < & [ u8 ] , Value > {
95- to_value_parser ( integer ) ( input)
95+ to_value_parser ( integer_parser ) ( input)
9696}
9797
9898/// Tries to parse &[u8] into Value::Symbol
You can’t perform that action at this time.
0 commit comments