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

Refactor Conn.LoadTypes by removing redundant check #2206

Merged
merged 1 commit into from
Dec 24, 2024

Conversation

alexandear
Copy link
Contributor

This PR simplifies the Conn.LoadTypes function:

  • Omits the typeNames == nil check because len(typeNames) will be 0 for a slice if typeNames is nil.
  • Omits the entire if typeNames == nil {} block because it is always false due to the check above.

@jackc jackc merged commit bcf3fbd into jackc:master Dec 24, 2024
14 checks passed
@alexandear alexandear deleted the refactor-impossible-cond branch December 24, 2024 17:22
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.

2 participants