(value: &BigInt)
| 131 | } |
| 132 | |
| 133 | pub fn hash_bigint(value: &BigInt) -> PyHash { |
| 134 | let ret = match value.to_i64() { |
| 135 | Some(i) => mod_int(i), |
| 136 | None => (value % MODULUS).to_i64().unwrap_or_else(|| unsafe { |
| 137 | // SAFETY: MODULUS < i64::MAX, so value % MODULUS is guaranteed to be in the range of i64 |
| 138 | core::hint::unreachable_unchecked() |
| 139 | }), |
| 140 | }; |
| 141 | fix_sentinel(ret) |
| 142 | } |
| 143 | |
| 144 | #[inline] |
| 145 | pub const fn hash_usize(data: usize) -> PyHash { |
no test coverage detected