Skip to content

Conversation

@sgaunet
Copy link
Owner

@sgaunet sgaunet commented Dec 7, 2025

Refactor Close() to use early return pattern, removing unreachable
return statement that occurred when c.db was nil. The new implementation
checks for nil database first, making the control flow clearer and
eliminating the code path that could never be executed.

Refactor Close() to use early return pattern, removing unreachable
return statement that occurred when c.db was nil. The new implementation
checks for nil database first, making the control flow clearer and
eliminating the code path that could never be executed.
@sgaunet sgaunet self-assigned this Dec 7, 2025
@sgaunet sgaunet added the bug Something isn't working label Dec 7, 2025
@sgaunet sgaunet linked an issue Dec 7, 2025 that may be closed by this pull request
4 tasks
@sgaunet sgaunet merged commit f5bff13 into main Dec 7, 2025
5 checks passed
@sgaunet sgaunet deleted the 18-fix-malformed-close-method-causing-unreachable-code branch December 7, 2025 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix malformed Close() method causing unreachable code

2 participants