mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-02 13:12:16 +00:00
Fix complex blocks warning when running clippy (#1488)
This commit is contained in:
parent
ee90373d35
commit
8de3cb0074
1 changed files with 4 additions and 2 deletions
|
@ -230,14 +230,16 @@ pub fn parse_comment(parser: &mut Parser) -> Result<Statement, ParserError> {
|
|||
}
|
||||
|
||||
pub fn parse_create(parser: &mut Parser) -> Option<Result<Statement, ParserError>> {
|
||||
match parser.maybe_parse(|parser| -> Result<ObjectName, ParserError> {
|
||||
let name = parser.maybe_parse(|parser| -> Result<ObjectName, ParserError> {
|
||||
parser.expect_keyword(Keyword::CREATE)?;
|
||||
parser.expect_keyword(Keyword::TYPE)?;
|
||||
let name = parser.parse_object_name(false)?;
|
||||
parser.expect_keyword(Keyword::AS)?;
|
||||
parser.expect_keyword(Keyword::ENUM)?;
|
||||
Ok(name)
|
||||
}) {
|
||||
});
|
||||
|
||||
match name {
|
||||
Ok(name) => name.map(|name| parse_create_type_as_enum(parser, name)),
|
||||
Err(e) => Some(Err(e)),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue