Commit f4d5564
refactor: Use iterator chain for branch searching instead of explicit loop
Replace the explicit for loop with a more idiomatic iterator chain using
find_map(). This addresses the PR review comment about simplifying the
branching code with method chaining.
The new implementation:
- Uses find_map() to search and transform in one step
- Eliminates the explicit for loop and early returns
- Maintains the same functionality with cleaner, more idiomatic Rust
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 27c41db commit f4d5564
1 file changed
Lines changed: 12 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
296 | | - | |
297 | | - | |
298 | | - | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
299 | 301 | | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
304 | 307 | | |
305 | | - | |
306 | | - | |
| 308 | + | |
307 | 309 | | |
308 | | - | |
309 | | - | |
| 310 | + | |
310 | 311 | | |
311 | 312 | | |
312 | 313 | | |
| |||
0 commit comments