File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -154,8 +154,8 @@ use crate::raw_vec::RawVec;
154
154
/// println!("{}", v[6]); // it will panic!
155
155
/// ```
156
156
///
157
- /// In conclusion: always check if the index you want to get really exists
158
- /// before doing it .
157
+ /// Use [`get`] and [`get_mut`] if you want to check whether the index is in
158
+ /// the `Vec` .
159
159
///
160
160
/// # Slicing
161
161
///
@@ -277,6 +277,8 @@ use crate::raw_vec::RawVec;
277
277
/// The order has changed in the past and may change again.
278
278
///
279
279
/// [`vec!`]: ../../std/macro.vec.html
280
+ /// [`get`]: ../../std/vec/struct.Vec.html#method.get
281
+ /// [`get_mut`]: ../../std/vec/struct.Vec.html#method.get_mut
280
282
/// [`Index`]: ../../std/ops/trait.Index.html
281
283
/// [`String`]: ../../std/string/struct.String.html
282
284
/// [`&str`]: ../../std/primitive.str.html
You can’t perform that action at this time.
0 commit comments