(&self, vm: &VirtualMachine)
| 1675 | } |
| 1676 | |
| 1677 | fn inner(&self, vm: &VirtualMachine) -> PyResult<PyMappedMutexGuard<'_, CursorInner>> { |
| 1678 | let guard = self.inner.lock(); |
| 1679 | Self::check_cursor_state(guard.as_ref(), vm)?; |
| 1680 | Ok(PyMutexGuard::map(guard, |x| unsafe { |
| 1681 | x.as_mut().unwrap_unchecked() |
| 1682 | })) |
| 1683 | } |
| 1684 | |
| 1685 | /// Check if cursor is valid without retaining the lock. |
| 1686 | /// Use this when you only need to verify the cursor state but don't need to modify it. |