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
@ -159,7 +159,7 @@ use crate::raw_vec::RawVec;
|
|||||||
/// # Slicing
|
/// # Slicing
|
||||||
///
|
///
|
||||||
/// A `Vec` can be mutable. Slices, on the other hand, are read-only objects.
|
/// 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]) {
|
/// fn read_slice(slice: &[usize]) {
|
||||||
|
Loading…
Reference in New Issue
Block a user