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] {
45714571 /// let num = &nums[2];
45724572 ///
45734573 /// assert_eq!(num, &1);
4574- /// assert_eq!(nums.elem_offset (num), Some(2));
4574+ /// assert_eq!(nums.element_offset (num), Some(2));
45754575 /// ```
45764576 /// Returning `None` with an in-between element:
45774577 /// ```
@@ -4586,12 +4586,12 @@ impl<T> [T] {
45864586 /// assert_eq!(ok_elm, &[0, 1]);
45874587 /// assert_eq!(weird_elm, &[1, 2]);
45884588 ///
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
45914591 /// ```
45924592 #[ must_use]
45934593 #[ 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 > {
45954595 if T :: IS_ZST {
45964596 panic ! ( "elements are zero-sized" ) ;
45974597 }
You can’t perform that action at this time.
0 commit comments