@@ -53,7 +53,7 @@ impl Mcountinhibit {
53
53
if ( 3 ..32 ) . contains ( & index) {
54
54
Ok ( bf_extract ( self . bits , index, 1 ) != 0 )
55
55
} else {
56
- Err ( Error :: OutOfBounds {
56
+ Err ( Error :: IndexOutOfBounds {
57
57
index,
58
58
min : 3 ,
59
59
max : 31 ,
@@ -81,7 +81,7 @@ impl Mcountinhibit {
81
81
self . bits = bf_insert ( self . bits , index, 1 , hpm as usize ) ;
82
82
Ok ( ( ) )
83
83
} else {
84
- Err ( Error :: OutOfBounds {
84
+ Err ( Error :: IndexOutOfBounds {
85
85
index,
86
86
min : 3 ,
87
87
max : 31 ,
@@ -114,7 +114,7 @@ pub unsafe fn try_set_hpm(index: usize) -> Result<()> {
114
114
if ( 3 ..32 ) . contains ( & index) {
115
115
_try_set ( 1 << index)
116
116
} else {
117
- Err ( Error :: OutOfBounds {
117
+ Err ( Error :: IndexOutOfBounds {
118
118
index,
119
119
min : 3 ,
120
120
max : 31 ,
@@ -133,7 +133,7 @@ pub unsafe fn try_clear_hpm(index: usize) -> Result<()> {
133
133
if ( 3 ..32 ) . contains ( & index) {
134
134
_try_clear ( 1 << index)
135
135
} else {
136
- Err ( Error :: OutOfBounds {
136
+ Err ( Error :: IndexOutOfBounds {
137
137
index,
138
138
min : 3 ,
139
139
max : 31 ,
@@ -180,15 +180,15 @@ mod tests {
180
180
( 0 ..2 ) . chain ( 32 ..64 ) . for_each ( |index| {
181
181
assert_eq ! (
182
182
m. try_hpm( index) ,
183
- Err ( Error :: OutOfBounds {
183
+ Err ( Error :: IndexOutOfBounds {
184
184
index,
185
185
min: 3 ,
186
186
max: 31
187
187
} )
188
188
) ;
189
189
assert_eq ! (
190
190
m. try_set_hpm( index, false ) ,
191
- Err ( Error :: OutOfBounds {
191
+ Err ( Error :: IndexOutOfBounds {
192
192
index,
193
193
min: 3 ,
194
194
max: 31
0 commit comments