From f18fbe5cda7debc2b1a7cece14e318b65a8a23b6 Mon Sep 17 00:00:00 2001 From: Nickolay Ponomarev Date: Thu, 13 Jun 2019 11:08:10 +0300 Subject: [PATCH] Remove unused parse_literal_double `parse_value` handles parsing a non-integer value in expression context, and we use parse_literal_uint() when expecting a number in other contexts (such as `FETCH FIRST ... ROWS`) --- src/sqlparser.rs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/sqlparser.rs b/src/sqlparser.rs index 76f873d8..8dad1ce5 100644 --- a/src/sqlparser.rs +++ b/src/sqlparser.rs @@ -1212,16 +1212,6 @@ impl Parser { } } - /// Parse a literal double - pub fn parse_literal_double(&mut self) -> Result { - match self.next_token() { - Some(Token::Number(s)) => s.parse::().map_err(|e| { - ParserError::ParserError(format!("Could not parse '{}' as f64: {}", s, e)) - }), - other => parser_err!(format!("Expected literal number, found {:?}", other)), - } - } - /// Parse a literal string pub fn parse_literal_string(&mut self) -> Result { match self.next_token() {