Show More
@@ -348,7 +348,9 b' py_class!(pub class DirstateMap |py| {' | |||||
348 |
|
348 | |||
349 | def __contains__(&self, key: PyObject) -> PyResult<bool> { |
|
349 | def __contains__(&self, key: PyObject) -> PyResult<bool> { | |
350 | let key = key.extract::<PyBytes>(py)?; |
|
350 | let key = key.extract::<PyBytes>(py)?; | |
351 | Ok(self.inner_shared(py).borrow().contains_key(HgPath::new(key.data(py)))) |
|
351 | Ok(self.inner_shared(py) | |
|
352 | .borrow() | |||
|
353 | .contains_key(HgPath::new(key.data(py)))) | |||
352 | } |
|
354 | } | |
353 |
|
355 | |||
354 | def __getitem__(&self, key: PyObject) -> PyResult<PyObject> { |
|
356 | def __getitem__(&self, key: PyObject) -> PyResult<PyObject> { | |
@@ -438,7 +440,10 b' py_class!(pub class DirstateMap |py| {' | |||||
438 |
|
440 | |||
439 | def copymapgetitem(&self, key: PyObject) -> PyResult<PyBytes> { |
|
441 | def copymapgetitem(&self, key: PyObject) -> PyResult<PyBytes> { | |
440 | let key = key.extract::<PyBytes>(py)?; |
|
442 | let key = key.extract::<PyBytes>(py)?; | |
441 | match self.inner_shared(py).borrow().copy_map.get(HgPath::new(key.data(py))) { |
|
443 | match self.inner_shared(py) | |
|
444 | .borrow() | |||
|
445 | .copy_map | |||
|
446 | .get(HgPath::new(key.data(py))) { | |||
442 | Some(copy) => Ok(PyBytes::new(py, copy.as_ref())), |
|
447 | Some(copy) => Ok(PyBytes::new(py, copy.as_ref())), | |
443 | None => Err(PyErr::new::<exc::KeyError, _>( |
|
448 | None => Err(PyErr::new::<exc::KeyError, _>( | |
444 | py, |
|
449 | py, |
General Comments 0
You need to be logged in to leave comments.
Login now