Skip to content

Commit 04f8545

Browse files
mbrubeckXMPPwocky
authored andcommitted
Improve docs for Vec::as_slice and as_mut_slice
Fixes rust-lang#25622.
1 parent 0733157 commit 04f8545

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/libcollections/vec.rs

Lines changed: 5 additions & 1 deletion
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)