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

Function hash_pointer

crates/common/src/hash.rs:85–89  ·  view source on GitHub ↗
(value: usize)

Source from the content-addressed store, hash-verified

83
84#[inline]
85pub const fn hash_pointer(value: usize) -> PyHash {
86 // TODO: 32bit?
87 let hash = (value >> 4) | value;
88 hash as _
89}
90
91#[inline]
92pub fn hash_float(value: f64) -> Option<PyHash> {

Callers 1

generate_hashMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected