File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -4571,7 +4571,7 @@ impl<T> [T] {
4571
4571
/// let num = &nums[2];
4572
4572
///
4573
4573
/// assert_eq!(num, &1);
4574
- /// assert_eq!(nums.elem_offset (num), Some(2));
4574
+ /// assert_eq!(nums.element_offset (num), Some(2));
4575
4575
/// ```
4576
4576
/// Returning `None` with an in-between element:
4577
4577
/// ```
@@ -4586,12 +4586,12 @@ impl<T> [T] {
4586
4586
/// assert_eq!(ok_elm, &[0, 1]);
4587
4587
/// assert_eq!(weird_elm, &[1, 2]);
4588
4588
///
4589
- /// assert_eq!(arr.elem_offset (ok_elm), Some(0)); // Points to element 0
4590
- /// assert_eq!(arr.elem_offset (weird_elm), None); // Points between element 0 and 1
4589
+ /// assert_eq!(arr.element_offset (ok_elm), Some(0)); // Points to element 0
4590
+ /// assert_eq!(arr.element_offset (weird_elm), None); // Points between element 0 and 1
4591
4591
/// ```
4592
4592
#[ must_use]
4593
4593
#[ unstable( feature = "substr_range" , issue = "126769" ) ]
4594
- pub fn elem_offset ( & self , element : & T ) -> Option < usize > {
4594
+ pub fn element_offset ( & self , element : & T ) -> Option < usize > {
4595
4595
if T :: IS_ZST {
4596
4596
panic ! ( "elements are zero-sized" ) ;
4597
4597
}
You can’t perform that action at this time.
0 commit comments