Skip to content

Commit d1ff5e1

Browse files
committed
edit std::vec::Vec::truncate docs
1 parent 42dead4 commit d1ff5e1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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)