Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor cleanup to avoid is_ok() #740

Merged
merged 1 commit into from Nov 30, 2022

Conversation

alamb
Copy link
Collaborator

@alamb alamb commented Nov 30, 2022

Minor style cleanup I noticed while reviewing #731 from @step-baby

@@ -2749,7 +2749,7 @@ impl<'a> Parser<'a> {
let index_name = self.parse_object_name()?;
self.expect_keyword(Keyword::ON)?;
let table_name = self.parse_object_name()?;
let using = if self.expect_keyword(Keyword::USING).is_ok() {
let using = if self.parse_keyword(Keyword::USING) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to call the error producing variant and the ignore the error

@coveralls
Copy link

Pull Request Test Coverage Report for Build 3586008961

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 86.335%

Totals Coverage Status
Change from base Build 3585989839: 0.0%
Covered Lines: 12105
Relevant Lines: 14021

💛 - Coveralls

@Dandandan Dandandan merged commit 77eddfc into sqlparser-rs:main Nov 30, 2022
@alamb alamb deleted the alamb/cleanup_code branch November 30, 2022 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants