Commit 12889da
fix: use saturating_sub and remove redundant trim_end in infra_reality_checker
Prevent potential debug-mode panic from usize underflow in the column
block depth walker by switching bare `depth -= 1` to
`depth.saturating_sub(1)`, matching the pattern already used in
`find_top_level_keyword`. Also remove the redundant `trim_end()` call
before `split_whitespace()` flagged by Clippy.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 7d83345 commit 12889da
1 file changed
Lines changed: 2 additions & 6 deletions
Lines changed: 2 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
| 149 | + | |
154 | 150 | | |
155 | 151 | | |
156 | 152 | | |
| |||
234 | 230 | | |
235 | 231 | | |
236 | 232 | | |
237 | | - | |
| 233 | + | |
238 | 234 | | |
239 | 235 | | |
240 | 236 | | |
| |||
0 commit comments