Commit b272893
committed
perf(mangler, minifier): initialize a Vec with a specific value using
https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=a7c0cc8b2427a67e50259253a85d0cbd
Replace `std::iter::from_fn` with `repeat_with` because it accepts a function that expects to return an `Option<T>`, but we always return a `Some`, and it doesn't satisfy the `TrustedLen` trait.Vec::from_iter_in combined with repeat_with (#9908)1 parent f7d078c commit b272893
2 files changed
Lines changed: 9 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
744 | 746 | | |
745 | 747 | | |
746 | 748 | | |
747 | | - | |
748 | | - | |
| 749 | + | |
| 750 | + | |
749 | 751 | | |
750 | 752 | | |
751 | 753 | | |
| |||
0 commit comments