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

Method saturate_index

crates/vm/src/sliceable.rs:181–183  ·  view source on GitHub ↗
(&self, p: isize)

Source from the content-addressed store, hash-verified

179 }
180
181 fn saturate_index(&self, p: isize) -> usize {
182 p.saturated_at(self.len())
183 }
184
185 fn getitem_by_slice(
186 &self,

Callers 2

insertMethod · 0.80
insertMethod · 0.80

Implementers 2

sliceable.rscrates/vm/src/sliceable.rs
str.rscrates/vm/src/builtins/str.rs

Calls 2

saturated_atMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected