Skip to content

Commit 2bb93bf

Browse files
fix: solve some inconsistencies between code and comments (#16974)
Modify Coment Code Inconsistency
1 parent 7f3ec69 commit 2bb93bf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/common/column/src/offset.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ impl<O: Offset> Offsets<O> {
122122
/// # Error
123123
/// This function errors iff the new last item is larger than what `O` supports.
124124
/// # Panic
125-
/// This function asserts that `length > 0`.
125+
/// This function asserts that `length >= O::zero()`.
126126
#[inline]
127127
pub fn try_push(&mut self, length: O) -> Result<(), Error> {
128128
let old_length = self.last();
@@ -171,7 +171,7 @@ impl<O: Offset> Offsets<O> {
171171

172172
/// Returns a range (start, end) corresponding to the position `index`
173173
/// # Panic
174-
/// This function panics iff `index >= self.len()`
174+
/// This function panics iff `index >= self.len_proxy()`
175175
#[inline]
176176
pub fn start_end(&self, index: usize) -> (usize, usize) {
177177
// soundness: the invariant of the function
@@ -456,7 +456,7 @@ impl<O: Offset> OffsetsBuffer<O> {
456456

457457
/// Returns a range (start, end) corresponding to the position `index`
458458
/// # Panic
459-
/// This function panics iff `index >= self.len()`
459+
/// This function panics iff `index >= self.len_proxy()`
460460
#[inline]
461461
pub fn start_end(&self, index: usize) -> (usize, usize) {
462462
// soundness: the invariant of the function

0 commit comments

Comments
 (0)