equal
deleted
inserted
replaced
317 )), |
317 )), |
318 } |
318 } |
319 } |
319 } |
320 |
320 |
321 def keys(&self) -> PyResult<DirstateMapKeysIterator> { |
321 def keys(&self) -> PyResult<DirstateMapKeysIterator> { |
322 let (leak_handle, leaked_ref) = unsafe { self.leak_immutable(py)? }; |
322 let (leak_handle, leaked_ref) = |
|
323 unsafe { self.inner_shared(py).leak_immutable()? }; |
323 DirstateMapKeysIterator::from_inner( |
324 DirstateMapKeysIterator::from_inner( |
324 py, |
325 py, |
325 leak_handle, |
326 leak_handle, |
326 leaked_ref.iter(), |
327 leaked_ref.iter(), |
327 ) |
328 ) |
328 } |
329 } |
329 |
330 |
330 def items(&self) -> PyResult<DirstateMapItemsIterator> { |
331 def items(&self) -> PyResult<DirstateMapItemsIterator> { |
331 let (leak_handle, leaked_ref) = unsafe { self.leak_immutable(py)? }; |
332 let (leak_handle, leaked_ref) = |
|
333 unsafe { self.inner_shared(py).leak_immutable()? }; |
332 DirstateMapItemsIterator::from_inner( |
334 DirstateMapItemsIterator::from_inner( |
333 py, |
335 py, |
334 leak_handle, |
336 leak_handle, |
335 leaked_ref.iter(), |
337 leaked_ref.iter(), |
336 ) |
338 ) |
337 } |
339 } |
338 |
340 |
339 def __iter__(&self) -> PyResult<DirstateMapKeysIterator> { |
341 def __iter__(&self) -> PyResult<DirstateMapKeysIterator> { |
340 let (leak_handle, leaked_ref) = unsafe { self.leak_immutable(py)? }; |
342 let (leak_handle, leaked_ref) = |
|
343 unsafe { self.inner_shared(py).leak_immutable()? }; |
341 DirstateMapKeysIterator::from_inner( |
344 DirstateMapKeysIterator::from_inner( |
342 py, |
345 py, |
343 leak_handle, |
346 leak_handle, |
344 leaked_ref.iter(), |
347 leaked_ref.iter(), |
345 ) |
348 ) |
452 None => Ok(default), |
455 None => Ok(default), |
453 } |
456 } |
454 } |
457 } |
455 |
458 |
456 def copymapiter(&self) -> PyResult<CopyMapKeysIterator> { |
459 def copymapiter(&self) -> PyResult<CopyMapKeysIterator> { |
457 let (leak_handle, leaked_ref) = unsafe { self.leak_immutable(py)? }; |
460 let (leak_handle, leaked_ref) = |
|
461 unsafe { self.inner_shared(py).leak_immutable()? }; |
458 CopyMapKeysIterator::from_inner( |
462 CopyMapKeysIterator::from_inner( |
459 py, |
463 py, |
460 leak_handle, |
464 leak_handle, |
461 leaked_ref.copy_map.iter(), |
465 leaked_ref.copy_map.iter(), |
462 ) |
466 ) |
463 } |
467 } |
464 |
468 |
465 def copymapitemsiter(&self) -> PyResult<CopyMapItemsIterator> { |
469 def copymapitemsiter(&self) -> PyResult<CopyMapItemsIterator> { |
466 let (leak_handle, leaked_ref) = unsafe { self.leak_immutable(py)? }; |
470 let (leak_handle, leaked_ref) = |
|
471 unsafe { self.inner_shared(py).leak_immutable()? }; |
467 CopyMapItemsIterator::from_inner( |
472 CopyMapItemsIterator::from_inner( |
468 py, |
473 py, |
469 leak_handle, |
474 leak_handle, |
470 leaked_ref.copy_map.iter(), |
475 leaked_ref.copy_map.iter(), |
471 ) |
476 ) |