Fix clippy lints in "Support qualified function names"

This commit is contained in:
Nickolay Ponomarev 2019-04-21 01:41:21 +03:00
parent de057deff6
commit 9a244e059e

View file

@ -188,24 +188,23 @@ impl Parser {
ends_with_wildcard = true; ends_with_wildcard = true;
break; break;
} }
_ => { unexpected => {
return parser_err!(format!( return parser_err!(format!(
"Error parsing compound identifier" "Expected an identifier or a '*' after '.', got: {:?}",
unexpected
)); ));
} }
} }
} }
if ends_with_wildcard { if ends_with_wildcard {
Ok(ASTNode::SQLQualifiedWildcard(id_parts)) Ok(ASTNode::SQLQualifiedWildcard(id_parts))
} else { } else if self.consume_token(&Token::LParen) {
if self.consume_token(&Token::LParen) {
self.prev_token(); self.prev_token();
self.parse_function(SQLObjectName(id_parts)) self.parse_function(SQLObjectName(id_parts))
} else { } else {
Ok(ASTNode::SQLCompoundIdentifier(id_parts)) Ok(ASTNode::SQLCompoundIdentifier(id_parts))
} }
} }
}
_ => Ok(ASTNode::SQLIdentifier(w.as_sql_ident())), _ => Ok(ASTNode::SQLIdentifier(w.as_sql_ident())),
}, },
}, // End of Token::SQLWord }, // End of Token::SQLWord