@@ -2,21 +2,21 @@ use super::Pointer;
22use crate :: Token ;
33use core:: ops:: Bound ;
44
5- pub trait SlicePointer < ' p > : private:: Sealed {
5+ pub trait PointerIndex < ' p > : private:: Sealed {
66 type Output : ' p ;
77
88 fn get ( self , pointer : & ' p Pointer ) -> Option < Self :: Output > ;
99}
1010
11- impl < ' p > SlicePointer < ' p > for usize {
11+ impl < ' p > PointerIndex < ' p > for usize {
1212 type Output = Token < ' p > ;
1313
1414 fn get ( self , pointer : & ' p Pointer ) -> Option < Self :: Output > {
1515 pointer. tokens ( ) . nth ( self )
1616 }
1717}
1818
19- impl < ' p > SlicePointer < ' p > for core:: ops:: Range < usize > {
19+ impl < ' p > PointerIndex < ' p > for core:: ops:: Range < usize > {
2020 type Output = & ' p Pointer ;
2121
2222 fn get ( self , pointer : & ' p Pointer ) -> Option < Self :: Output > {
@@ -56,7 +56,7 @@ impl<'p> SlicePointer<'p> for core::ops::Range<usize> {
5656 }
5757}
5858
59- impl < ' p > SlicePointer < ' p > for core:: ops:: RangeFrom < usize > {
59+ impl < ' p > PointerIndex < ' p > for core:: ops:: RangeFrom < usize > {
6060 type Output = & ' p Pointer ;
6161
6262 fn get ( self , pointer : & ' p Pointer ) -> Option < Self :: Output > {
@@ -81,7 +81,7 @@ impl<'p> SlicePointer<'p> for core::ops::RangeFrom<usize> {
8181 }
8282}
8383
84- impl < ' p > SlicePointer < ' p > for core:: ops:: RangeTo < usize > {
84+ impl < ' p > PointerIndex < ' p > for core:: ops:: RangeTo < usize > {
8585 type Output = & ' p Pointer ;
8686
8787 fn get ( self , pointer : & ' p Pointer ) -> Option < Self :: Output > {
@@ -114,15 +114,15 @@ impl<'p> SlicePointer<'p> for core::ops::RangeTo<usize> {
114114 }
115115}
116116
117- impl < ' p > SlicePointer < ' p > for core:: ops:: RangeFull {
117+ impl < ' p > PointerIndex < ' p > for core:: ops:: RangeFull {
118118 type Output = & ' p Pointer ;
119119
120120 fn get ( self , pointer : & ' p Pointer ) -> Option < Self :: Output > {
121121 Some ( pointer)
122122 }
123123}
124124
125- impl < ' p > SlicePointer < ' p > for core:: ops:: RangeInclusive < usize > {
125+ impl < ' p > PointerIndex < ' p > for core:: ops:: RangeInclusive < usize > {
126126 type Output = & ' p Pointer ;
127127
128128 fn get ( self , pointer : & ' p Pointer ) -> Option < Self :: Output > {
@@ -160,7 +160,7 @@ impl<'p> SlicePointer<'p> for core::ops::RangeInclusive<usize> {
160160 }
161161}
162162
163- impl < ' p > SlicePointer < ' p > for core:: ops:: RangeToInclusive < usize > {
163+ impl < ' p > PointerIndex < ' p > for core:: ops:: RangeToInclusive < usize > {
164164 type Output = & ' p Pointer ;
165165
166166 fn get ( self , pointer : & ' p Pointer ) -> Option < Self :: Output > {
@@ -190,7 +190,7 @@ impl<'p> SlicePointer<'p> for core::ops::RangeToInclusive<usize> {
190190 }
191191}
192192
193- impl < ' p > SlicePointer < ' p > for ( Bound < usize > , Bound < usize > ) {
193+ impl < ' p > PointerIndex < ' p > for ( Bound < usize > , Bound < usize > ) {
194194 type Output = & ' p Pointer ;
195195
196196 fn get ( self , pointer : & ' p Pointer ) -> Option < Self :: Output > {
0 commit comments