File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -4641,7 +4641,7 @@ impl<T> [T] {
4641
4641
4642
4642
/// Returns the index that an element reference points to.
4643
4643
///
4644
- /// Returns `None` if `element` does not point within the slice or if it points between elements .
4644
+ /// Returns `None` if `element` does not point to the start of an element within the slice .
4645
4645
///
4646
4646
/// This method is useful for extending slice iterators like [`slice::split`].
4647
4647
///
@@ -4663,7 +4663,7 @@ impl<T> [T] {
4663
4663
/// assert_eq!(num, &1);
4664
4664
/// assert_eq!(nums.element_offset(num), Some(2));
4665
4665
/// ```
4666
- /// Returning `None` with an in-between element:
4666
+ /// Returning `None` with an unaligned element:
4667
4667
/// ```
4668
4668
/// #![feature(substr_range)]
4669
4669
///
@@ -4702,7 +4702,8 @@ impl<T> [T] {
4702
4702
4703
4703
/// Returns the range of indices that a subslice points to.
4704
4704
///
4705
- /// Returns `None` if `subslice` does not point within the slice or if it points between elements.
4705
+ /// Returns `None` if `subslice` does not point within the slice or if it is not aligned with the
4706
+ /// elements in the slice.
4706
4707
///
4707
4708
/// This method **does not compare elements**. Instead, this method finds the location in the slice that
4708
4709
/// `subslice` was obtained from. To find the index of a subslice via comparison, instead use
You can’t perform that action at this time.
0 commit comments