(&self, py: Python)
| 384 | } |
| 385 | |
| 386 | fn validate_generation(&self, py: Python) -> PyResult<()> { |
| 387 | if self.state.current_generation(py) == self.generation { |
| 388 | Ok(()) |
| 389 | } else { |
| 390 | Err(PyErr::new::<exc::RuntimeError, _>( |
| 391 | py, |
| 392 | "Cannot access to leaked reference after mutation", |
| 393 | )) |
| 394 | } |
| 395 | } |
| 396 | } |
| 397 | |
| 398 | impl<T> UnsafePyLeaked<T> { |
no test coverage detected