diff --git a/src/parse.rs b/src/parse.rs index 2291abdca1..8072c110b1 100644 --- a/src/parse.rs +++ b/src/parse.rs @@ -678,7 +678,7 @@ where I: Stream, )) ); - optional(char('-')) + optional(attempt(char('-'))) // Do this lookahead to decide if we should parse this as a number. // This matters because once we commit to parsing it as a number, // we may discover non-digit chars, indicating this is actually an @@ -755,7 +755,7 @@ where I: Stream, )) ); - optional(char('-')) + optional(attempt(char('-'))) // Do this lookahead to decide if we should parse this as a number. // This matters because once we commit to parsing it as a number, // we may discover non-digit chars, indicating this is actually an