Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
fix dyn Array::slice docstring (#792)
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 authored Jan 29, 2022
1 parent 601fa08 commit 22a065e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/array/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ pub trait Array: Send + Sync {
/// This operation is `O(1)` over `len`, as it amounts to increase two ref counts
/// and moving the struct to the heap.
/// # Panic
/// This function panics iff `offset + length >= self.len()`.
/// This function panics iff `offset + length > self.len()`.
fn slice(&self, offset: usize, length: usize) -> Box<dyn Array>;

/// Slices the [`Array`], returning a new `Box<dyn Array>`.
/// # Implementation
/// This operation is `O(1)` over `len`, as it amounts to increase two ref counts
/// and moving the struct to the heap.
/// # Safety
/// The caller must ensure that `offset + length <=| self.len()`
/// The caller must ensure that `offset + length <= self.len()`
unsafe fn slice_unchecked(&self, offset: usize, length: usize) -> Box<dyn Array>;

/// Sets the validity bitmap on this [`Array`].
Expand Down

0 comments on commit 22a065e

Please sign in to comment.