Commit 34e1e17
committed
Don't reload length in String::push
Same as in Vec::push_mut, we get `.len()` once at the start since
it won't change in the `reserve()` call.
Saves reloading the length after the allocation: https://godbolt.org/z/W3G165Gd71 parent d4f7856 commit 34e1e17
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1420 | 1420 | | |
1421 | 1421 | | |
1422 | 1422 | | |
1423 | | - | |
| 1423 | + | |
1424 | 1424 | | |
1425 | 1425 | | |
1426 | 1426 | | |
| |||
0 commit comments