Skip to content

Commit 4127632

Browse files
authored
Merge aa594fe into efb1e3d
2 parents efb1e3d + aa594fe commit 4127632

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

library/alloc/src/string.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1735,8 +1735,10 @@ impl String {
17351735

17361736
/// Inserts a string slice into this `String` at a byte position.
17371737
///
1738-
/// This is an *O*(*n*) operation as it requires copying every element in the
1739-
/// buffer.
1738+
/// Reallocates if `self.capacity()` is insufficient,
1739+
/// (which may involve copying all `self.capacity()` bytes).
1740+
/// Makes space at the given position for the insertion,
1741+
/// by moving the bytes, from the given position until the end, to new positions.
17401742
///
17411743
/// # Panics
17421744
///

0 commit comments

Comments
 (0)