This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 0f0c0d8
committed
Avoid redundant WTF-8 checks in
Eliminate checks for WTF-8 boundaries in `PathBuf::set_extension` and
`add_extension`, where joining WTF-8 surrogate halves is impossible.
Don't convert the `str` to `OsStr`, because `OsString::push` specializes
to skip the joining when given strings.PathBuf
1 parent 7cb357a commit 0f0c0d8
1 file changed
+10
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1526 | 1526 | | |
1527 | 1527 | | |
1528 | 1528 | | |
1529 | | - | |
| 1529 | + | |
1530 | 1530 | | |
1531 | 1531 | | |
1532 | | - | |
1533 | | - | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
1534 | 1536 | | |
1535 | 1537 | | |
1536 | 1538 | | |
| |||
1587 | 1589 | | |
1588 | 1590 | | |
1589 | 1591 | | |
1590 | | - | |
| 1592 | + | |
1591 | 1593 | | |
1592 | 1594 | | |
1593 | 1595 | | |
| |||
1597 | 1599 | | |
1598 | 1600 | | |
1599 | 1601 | | |
1600 | | - | |
1601 | | - | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
1602 | 1606 | | |
1603 | 1607 | | |
1604 | 1608 | | |
| |||
0 commit comments