Skip to content

Commit 88c3bc5

Browse files
committed
Correct the doc a little
1 parent 874f6c9 commit 88c3bc5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/raw/mod.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1588,6 +1588,9 @@ impl<A: Allocator + Clone> RawTableInner<A> {
15881588
/// Searches for an empty or deleted bucket which is suitable for inserting
15891589
/// a new element, returning the `index` for the new [`Bucket`].
15901590
///
1591+
/// This function does not make any changes to the `data` part of the table, or any
1592+
/// changes to the `items` or `growth_left` field of the table.
1593+
///
15911594
/// The table must have at least 1 empty or deleted `bucket`, otherwise this function
15921595
/// will never return (will go into an infinite loop) for tables larger than the group
15931596
/// width, or return an index outside of the table indices range if the table is less
@@ -1598,10 +1601,9 @@ impl<A: Allocator + Clone> RawTableInner<A> {
15981601
/// Actually, calling this function is always safe, but attempting to write data at
15991602
/// the index returned by this function when the table is less than the group width
16001603
/// and if there was not at least one empty bucket in the table will cause immediate
1601-
/// [`undefined behavior`].
1602-
///
1603-
/// This is because in this case the function will return `self.bucket_mask + 1`
1604-
/// as an index due to the trailing EMPTY control bytes outside the table range.
1604+
/// [`undefined behavior`]. This is because in this case the function will return
1605+
/// `self.bucket_mask + 1` as an index due to the trailing EMPTY control bytes outside
1606+
/// the table range.
16051607
///
16061608
/// [`undefined behavior`]: https://doc.rust-lang.org/reference/behavior-considered-undefined.html
16071609
#[inline]

0 commit comments

Comments
 (0)