Link vec doc to & reference
It is not always obvious that people could see the docs for `&` especially for beginners, it also helps learnability.
This commit is contained in:
parent
1dc748fb3d
commit
bb5e79cbd1
1 changed files with 1 additions and 1 deletions
|
@ -159,7 +159,7 @@ use crate::raw_vec::RawVec;
|
|||
/// # Slicing
|
||||
///
|
||||
/// A `Vec` can be mutable. Slices, on the other hand, are read-only objects.
|
||||
/// To get a slice, use `&`. Example:
|
||||
/// To get a slice, use [`&`][prim@reference]. Example:
|
||||
///
|
||||
/// ```
|
||||
/// fn read_slice(slice: &[usize]) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue