Skip to content

Commit

Permalink
Fix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
cmpute authored Apr 2, 2024
1 parent 7bfb6ec commit 2679a28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/types/slice.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::err::{PyErr, PyResult};
use crate::ffi::{self, Py_ssize_t};
use crate::ffi;
use crate::ffi_ptr_ext::FfiPtrExt;
use crate::types::any::PyAnyMethods;
use crate::{Bound, PyAny, PyNativeType, PyObject, Python, ToPyObject};
Expand Down Expand Up @@ -117,7 +117,6 @@ pub trait PySliceMethods<'py>: crate::sealed::Sealed {

impl<'py> PySliceMethods<'py> for Bound<'py, PySlice> {
fn indices(&self, length: isize) -> PyResult<PySliceIndices> {
// non-negative Py_ssize_t should always fit into Rust usize
unsafe {
let mut slicelength: isize = 0;
let mut start: isize = 0;
Expand All @@ -136,6 +135,7 @@ impl<'py> PySliceMethods<'py> for Bound<'py, PySlice> {
start,
stop,
step,
// non-negative isize should always fit into usize
slicelength: slicelength as _,
})
} else {
Expand Down

0 comments on commit 2679a28

Please sign in to comment.