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 @@ -4553,7 +4553,7 @@ impl<T> [T] {
45534553 /// let num = &nums[2];
45544554 ///
45554555 /// assert_eq!(num, &1);
4556- /// assert_eq!(nums.elem_offset (num), Some(2));
4556+ /// assert_eq!(nums.element_offset (num), Some(2));
45574557 /// ```
45584558 /// Returning `None` with an in-between element:
45594559 /// ```
@@ -4568,12 +4568,12 @@ impl<T> [T] {
45684568 /// assert_eq!(ok_elm, &[0, 1]);
45694569 /// assert_eq!(weird_elm, &[1, 2]);
45704570 ///
4571- /// assert_eq!(arr.elem_offset (ok_elm), Some(0)); // Points to element 0
4572- /// assert_eq!(arr.elem_offset (weird_elm), None); // Points between element 0 and 1
4571+ /// assert_eq!(arr.element_offset (ok_elm), Some(0)); // Points to element 0
4572+ /// assert_eq!(arr.element_offset (weird_elm), None); // Points between element 0 and 1
45734573 /// ```
45744574 #[ must_use]
45754575 #[ unstable( feature = "substr_range" , issue = "126769" ) ]
4576- pub fn elem_offset ( & self , element : & T ) -> Option < usize > {
4576+ pub fn element_offset ( & self , element : & T ) -> Option < usize > {
45774577 if T :: IS_ZST {
45784578 panic ! ( "elements are zero-sized" ) ;
45794579 }
You can’t perform that action at this time.
0 commit comments