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

Function hash_object_id_raw

crates/common/src/hash.rs:168–176  ·  view source on GitHub ↗
(p: usize)

Source from the content-addressed store, hash-verified

166
167#[inline]
168pub const fn hash_object_id_raw(p: usize) -> PyHash {
169 // TODO: Use commented logic when below issue resolved.
170 // Ref: https://github.com/RustPython/RustPython/pull/3951#issuecomment-1193108966
171
172 /* bottom 3 or 4 bits are likely to be 0; rotate y by 4 to avoid
173 excessive hash collisions for dicts and sets */
174 // p.rotate_right(4) as PyHash
175 p as PyHash
176}
177
178#[inline]
179pub const fn hash_object_id(p: usize) -> PyHash {

Callers 2

hash_object_idFunction · 0.85
hashMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected