(zelf: &crate::Py<Self>, vm: &VirtualMachine)
| 516 | |
| 517 | impl Hashable for Pattern { |
| 518 | fn hash(zelf: &crate::Py<Self>, vm: &VirtualMachine) -> PyResult<PyHash> { |
| 519 | let hash = zelf.pattern.hash(vm)?; |
| 520 | let (_, code, _) = unsafe { zelf.code.align_to::<u8>() }; |
| 521 | let hash = hash ^ vm.state.hash_secret.hash_bytes(code); |
| 522 | let hash = hash ^ (zelf.flags.bits() as PyHash); |
| 523 | let hash = hash ^ (zelf.isbytes as i64); |
| 524 | Ok(hash) |
| 525 | } |
| 526 | } |
| 527 | |
| 528 | impl Comparable for Pattern { |
no test coverage detected