Commit 275af73
authored
refactor(gears): remove redundant nil check (#2728)
From the Go specification:
"1. For a nil slice, the number of iterations is 0." [1]
Therefore, an additional nil check for before the loop is unnecessary.
[1]: https://go.dev/ref/spec#For_range
Signed-off-by: Eng Zer Jun <[email protected]>1 parent dac3314 commit 275af73
1 file changed
+8
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
| 113 | + | |
| 114 | + | |
117 | 115 | | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
| 116 | + | |
| 117 | + | |
122 | 118 | | |
123 | 119 | | |
124 | 120 | | |
| |||
140 | 136 | | |
141 | 137 | | |
142 | 138 | | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
| 139 | + | |
| 140 | + | |
147 | 141 | | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
| 142 | + | |
| 143 | + | |
152 | 144 | | |
153 | 145 | | |
154 | 146 | | |
| |||
0 commit comments