@@ -53,7 +53,7 @@ impl Mcountinhibit {
5353 if ( 3 ..32 ) . contains ( & index) {
5454 Ok ( bf_extract ( self . bits , index, 1 ) != 0 )
5555 } else {
56- Err ( Error :: OutOfBounds {
56+ Err ( Error :: IndexOutOfBounds {
5757 index,
5858 min : 3 ,
5959 max : 31 ,
@@ -81,7 +81,7 @@ impl Mcountinhibit {
8181 self . bits = bf_insert ( self . bits , index, 1 , hpm as usize ) ;
8282 Ok ( ( ) )
8383 } else {
84- Err ( Error :: OutOfBounds {
84+ Err ( Error :: IndexOutOfBounds {
8585 index,
8686 min : 3 ,
8787 max : 31 ,
@@ -114,7 +114,7 @@ pub unsafe fn try_set_hpm(index: usize) -> Result<()> {
114114 if ( 3 ..32 ) . contains ( & index) {
115115 _try_set ( 1 << index)
116116 } else {
117- Err ( Error :: OutOfBounds {
117+ Err ( Error :: IndexOutOfBounds {
118118 index,
119119 min : 3 ,
120120 max : 31 ,
@@ -133,7 +133,7 @@ pub unsafe fn try_clear_hpm(index: usize) -> Result<()> {
133133 if ( 3 ..32 ) . contains ( & index) {
134134 _try_clear ( 1 << index)
135135 } else {
136- Err ( Error :: OutOfBounds {
136+ Err ( Error :: IndexOutOfBounds {
137137 index,
138138 min : 3 ,
139139 max : 31 ,
@@ -180,15 +180,15 @@ mod tests {
180180 ( 0 ..2 ) . chain ( 32 ..64 ) . for_each ( |index| {
181181 assert_eq ! (
182182 m. try_hpm( index) ,
183- Err ( Error :: OutOfBounds {
183+ Err ( Error :: IndexOutOfBounds {
184184 index,
185185 min: 3 ,
186186 max: 31
187187 } )
188188 ) ;
189189 assert_eq ! (
190190 m. try_set_hpm( index, false ) ,
191- Err ( Error :: OutOfBounds {
191+ Err ( Error :: IndexOutOfBounds {
192192 index,
193193 min: 3 ,
194194 max: 31
0 commit comments