Skip to content

Commit

Permalink
fix: solve some inconsistencies between code and comments (#16974)
Browse files Browse the repository at this point in the history
Modify Coment Code Inconsistency
  • Loading branch information
YichiZhang0613 authored Nov 30, 2024
1 parent 7f3ec69 commit 2bb93bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/common/column/src/offset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ impl<O: Offset> Offsets<O> {
/// # Error
/// This function errors iff the new last item is larger than what `O` supports.
/// # Panic
/// This function asserts that `length > 0`.
/// This function asserts that `length >= O::zero()`.
#[inline]
pub fn try_push(&mut self, length: O) -> Result<(), Error> {
let old_length = self.last();
Expand Down Expand Up @@ -171,7 +171,7 @@ impl<O: Offset> Offsets<O> {

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

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

0 comments on commit 2bb93bf

Please sign in to comment.