Improve docs for Vec::as_slice and as_mut_slice

Fixes #25622.
This commit is contained in:
Matt Brubeck 2015-05-27 12:37:29 -07:00
parent af60248ecf
commit 6c2b340fdc

View file

@ -440,6 +440,8 @@ pub fn truncate(&mut self, len: usize) {
}
/// Extracts a slice containing the entire vector.
///
/// Equivalent to `&s[..]`.
#[inline]
#[unstable(feature = "convert",
reason = "waiting on RFC revision")]
@ -447,7 +449,9 @@ pub fn as_slice(&self) -> &[T] {
self
}
/// Deprecated: use `&mut s[..]` instead.
/// Extracts a mutable slice of the entire vector.
///
/// Equivalent to `&mut s[..]`.
#[inline]
#[unstable(feature = "convert",
reason = "waiting on RFC revision")]