Commit 6edd569
committed
fix(client): eliminate unreachable code in Close method
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.1 parent 4989efd commit 6edd569
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
| 43 | + | |
47 | 44 | | |
48 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
0 commit comments