Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
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
insert
Method · 0.80
insert
Method · 0.80
Implementers
2
sliceable.rs
crates/vm/src/sliceable.rs
str.rs
crates/vm/src/builtins/str.rs
Calls
2
saturated_at
Method · 0.80
len
Method · 0.45
Tested by
no test coverage detected