Commit a90f543
fix(compile): use checked u32 arithmetic in migration runner
Address code review finding: the runner did `1 + registry.len() as u32`
and `m.to_version == current + 1` without overflow checks. With
realistic registries this is unreachable, but rust panics on overflow
in debug mode and wraps in release. Switch to checked_add so we
surface a clear error either way; preserves existing behavior on all
realistic inputs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 2ac4560 commit a90f543
1 file changed
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
179 | 189 | | |
180 | 190 | | |
181 | 191 | | |
| |||
202 | 212 | | |
203 | 213 | | |
204 | 214 | | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
205 | 218 | | |
206 | | - | |
| 219 | + | |
207 | 220 | | |
208 | 221 | | |
209 | 222 | | |
| |||
0 commit comments