Commit b30f3e7
committed
Auto merge of #136816 - yotamofek:pr/notable-traits-button-cleanup, r=<try>
Refactor `notable_trait_buttons` to use iterator combinators instead of `for` loop
Small cleanup.
Use `Iterator::any` instead of `for` loop with `predicate = true;`.
I think this makes the code more readable... and also has the additional benefit of short-circuiting the iterator when a notable trait is found (a `break` statement was missing in the `for` loop version, I think). Probably won't be significant enough to show on perf results, though.1 file changed
+12
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1432 | 1432 | | |
1433 | 1433 | | |
1434 | 1434 | | |
1435 | | - | |
1436 | | - | |
1437 | 1435 | | |
1438 | 1436 | | |
1439 | 1437 | | |
| |||
1451 | 1449 | | |
1452 | 1450 | | |
1453 | 1451 | | |
1454 | | - | |
1455 | | - | |
1456 | | - | |
1457 | | - | |
1458 | | - | |
1459 | | - | |
1460 | | - | |
1461 | | - | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
1462 | 1459 | | |
1463 | 1460 | | |
1464 | | - | |
1465 | | - | |
1466 | | - | |
1467 | | - | |
1468 | | - | |
1469 | | - | |
1470 | | - | |
1471 | | - | |
1472 | | - | |
1473 | | - | |
1474 | | - | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
1475 | 1466 | | |
1476 | 1467 | | |
1477 | 1468 | | |
| |||
0 commit comments