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 @@ -4661,7 +4661,7 @@ impl<T> [T] {
46614661 /// let num = &nums[2];
46624662 ///
46634663 /// assert_eq!(num, &1);
4664- /// assert_eq!(nums.elem_offset (num), Some(2));
4664+ /// assert_eq!(nums.element_offset (num), Some(2));
46654665 /// ```
46664666 /// Returning `None` with an in-between element:
46674667 /// ```
@@ -4676,12 +4676,12 @@ impl<T> [T] {
46764676 /// assert_eq!(ok_elm, &[0, 1]);
46774677 /// assert_eq!(weird_elm, &[1, 2]);
46784678 ///
4679- /// assert_eq!(arr.elem_offset (ok_elm), Some(0)); // Points to element 0
4680- /// assert_eq!(arr.elem_offset (weird_elm), None); // Points between element 0 and 1
4679+ /// assert_eq!(arr.element_offset (ok_elm), Some(0)); // Points to element 0
4680+ /// assert_eq!(arr.element_offset (weird_elm), None); // Points between element 0 and 1
46814681 /// ```
46824682 #[ must_use]
46834683 #[ unstable( feature = "substr_range" , issue = "126769" ) ]
4684- pub fn elem_offset ( & self , element : & T ) -> Option < usize > {
4684+ pub fn element_offset ( & self , element : & T ) -> Option < usize > {
46854685 if T :: IS_ZST {
46864686 panic ! ( "elements are zero-sized" ) ;
46874687 }
You can’t perform that action at this time.
0 commit comments