Commit 7c84a56
committed
docs(allocator/vec): correct safety comments for
Follow-on after #10884.
The original safety conditions aren't required any more, because of the change made to `Vec::reserve` in #10884 - `reserve` will panic if `other.len` or `self.len + other.len` exceeds `u32::MAX`. So nothing can go wrong if these conditions aren't satisfied.
Which is lucky, because `append` doesn't do anything to make sure `self.len + other.len <= u32::MAX`!
`append_elements` originally had no safety docs at all (naughty bumpalo!). So add some.RawVec::append_elements (#11072)1 parent fc2f040 commit 7c84a56
1 file changed
+9
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1627 | 1627 | | |
1628 | 1628 | | |
1629 | 1629 | | |
| 1630 | + | |
1630 | 1631 | | |
1631 | 1632 | | |
1632 | 1633 | | |
| |||
1636 | 1637 | | |
1637 | 1638 | | |
1638 | 1639 | | |
1639 | | - | |
1640 | | - | |
1641 | | - | |
1642 | | - | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
1643 | 1643 | | |
1644 | 1644 | | |
1645 | 1645 | | |
1646 | 1646 | | |
1647 | 1647 | | |
1648 | 1648 | | |
1649 | 1649 | | |
1650 | | - | |
1651 | | - | |
1652 | | - | |
1653 | | - | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
1654 | 1655 | | |
1655 | 1656 | | |
1656 | 1657 | | |
| |||
0 commit comments