File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ impl<O: Offset> Offsets<O> {
122
122
/// # Error
123
123
/// This function errors iff the new last item is larger than what `O` supports.
124
124
/// # Panic
125
- /// This function asserts that `length > 0 `.
125
+ /// This function asserts that `length >= O::zero() `.
126
126
#[ inline]
127
127
pub fn try_push ( & mut self , length : O ) -> Result < ( ) , Error > {
128
128
let old_length = self . last ( ) ;
@@ -171,7 +171,7 @@ impl<O: Offset> Offsets<O> {
171
171
172
172
/// Returns a range (start, end) corresponding to the position `index`
173
173
/// # Panic
174
- /// This function panics iff `index >= self.len ()`
174
+ /// This function panics iff `index >= self.len_proxy ()`
175
175
#[ inline]
176
176
pub fn start_end ( & self , index : usize ) -> ( usize , usize ) {
177
177
// soundness: the invariant of the function
@@ -456,7 +456,7 @@ impl<O: Offset> OffsetsBuffer<O> {
456
456
457
457
/// Returns a range (start, end) corresponding to the position `index`
458
458
/// # Panic
459
- /// This function panics iff `index >= self.len ()`
459
+ /// This function panics iff `index >= self.len_proxy ()`
460
460
#[ inline]
461
461
pub fn start_end ( & self , index : usize ) -> ( usize , usize ) {
462
462
// soundness: the invariant of the function
You can’t perform that action at this time.
0 commit comments