MCPcopy Index your code
hub / github.com/RustPython/RustPython / new

Method new

crates/vm/src/sliceable.rs:413–416  ·  view source on GitHub ↗
(slice: &SaturatedSlice, seq_len: usize)

Source from the content-addressed store, hash-verified

411
412impl SaturatedSliceIter {
413 pub fn new(slice: &SaturatedSlice, seq_len: usize) -> Self {
414 let (range, step, len) = slice.adjust_indices(seq_len);
415 Self::from_adjust_indices(range, step, len)
416 }
417
418 pub const fn from_adjust_indices(range: Range<usize>, step: isize, len: usize) -> Self {
419 let index = if step.is_negative() {

Callers

nothing calls this directly

Calls 1

adjust_indicesMethod · 0.80

Tested by

no test coverage detected