Skip to content

Commit

Permalink
fix: bytes typo
Browse files Browse the repository at this point in the history
  • Loading branch information
jessekrubin committed Feb 20, 2025
1 parent 5892fc2 commit 1bb3245
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions crates/ryo3-bytes/src/bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,8 @@ impl PyBytes {
fn slice(&self, slice: &Bound<'_, PySlice>) -> PyResult<PyBytes> {
let bytes_length = self.0.len() as isize;
let (start, stop, step) = {
let slice_indicies = slice.indices(bytes_length)?;
(
slice_indicies.start,
slice_indicies.stop,
slice_indicies.step,
)
let slice_indices = slice.indices(bytes_length)?;
(slice_indices.start, slice_indices.stop, slice_indices.step)
};

let new_capacity = if (step > 0 && stop > start) || (step < 0 && stop < start) {
Expand Down

0 comments on commit 1bb3245

Please sign in to comment.