Skip to content

Commit d2ace2e

Browse files
authored
Unrolled build for rust-lang#115895
Rollup merge of rust-lang#115895 - 52:patch-docs-vec-truncate, r=dtolnay Improve Vec(Deque)::truncate documentation Fixes rust-lang#115784
2 parents 341ef15 + 1c7a77a commit d2ace2e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

library/alloc/src/collections/vec_deque/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1015,8 +1015,8 @@ impl<T, A: Allocator> VecDeque<T, A> {
10151015
/// Shortens the deque, keeping the first `len` elements and dropping
10161016
/// the rest.
10171017
///
1018-
/// If `len` is greater than the deque's current length, this has no
1019-
/// effect.
1018+
/// If `len` is greater or equal to the deque's current length, this has
1019+
/// no effect.
10201020
///
10211021
/// # Examples
10221022
///

library/alloc/src/vec/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1110,8 +1110,8 @@ impl<T, A: Allocator> Vec<T, A> {
11101110
/// Shortens the vector, keeping the first `len` elements and dropping
11111111
/// the rest.
11121112
///
1113-
/// If `len` is greater than the vector's current length, this has no
1114-
/// effect.
1113+
/// If `len` is greater or equal to the vector's current length, this has
1114+
/// no effect.
11151115
///
11161116
/// The [`drain`] method can emulate `truncate`, but causes the excess
11171117
/// elements to be returned instead of dropped.

0 commit comments

Comments
 (0)