Skip to content

Commit 6c2b340

Browse files
committed
Improve docs for Vec::as_slice and as_mut_slice
Fixes #25622.
1 parent af60248 commit 6c2b340

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/libcollections/vec.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -440,14 +440,18 @@ impl<T> Vec<T> {
440440
}
441441

442442
/// Extracts a slice containing the entire vector.
443+
///
444+
/// Equivalent to `&s[..]`.
443445
#[inline]
444446
#[unstable(feature = "convert",
445447
reason = "waiting on RFC revision")]
446448
pub fn as_slice(&self) -> &[T] {
447449
self
448450
}
449451

450-
/// Deprecated: use `&mut s[..]` instead.
452+
/// Extracts a mutable slice of the entire vector.
453+
///
454+
/// Equivalent to `&mut s[..]`.
451455
#[inline]
452456
#[unstable(feature = "convert",
453457
reason = "waiting on RFC revision")]

0 commit comments

Comments
 (0)