diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2021-01-30 13:36:55 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-30 13:36:55 +0900 |
| commit | 0f11a943cc73b1110961e45c2a7aeee3ceef73e4 (patch) | |
| tree | 29554dd946578cdeaffd4c04fe1ed806b01e5623 | |
| parent | b43c1d50b780f194298f85587b2912c0058c8481 (diff) | |
| parent | 02094f99620b6e2f9c97e25d39fd6ada6a558adf (diff) | |
| download | rust-0f11a943cc73b1110961e45c2a7aeee3ceef73e4.tar.gz rust-0f11a943cc73b1110961e45c2a7aeee3ceef73e4.zip | |
Rollup merge of #81499 - SOF3:patch-1, r=sanxiyn
Updated Vec::splice documentation Replacing with equal number of values does not increase the length of the vec. Reference: https://stackoverflow.com/a/62559271/3990767
| -rw-r--r-- | library/alloc/src/vec/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs index 13fcf5207e0..9aea19f04c6 100644 --- a/library/alloc/src/vec/mod.rs +++ b/library/alloc/src/vec/mod.rs @@ -2211,7 +2211,7 @@ impl<T, A: Allocator> Vec<T, A> { /// This is optimal if: /// /// * The tail (elements in the vector after `range`) is empty, - /// * or `replace_with` yields fewer elements than `range`’s length + /// * or `replace_with` yields fewer or equal elements than `range`’s length /// * or the lower bound of its `size_hint()` is exact. /// /// Otherwise, a temporary vector is allocated and the tail is moved twice. |
