Show More
@@ -348,7 +348,9 b' py_class!(pub class DirstateMap |py| {' | |||
|
348 | 348 | |
|
349 | 349 | def __contains__(&self, key: PyObject) -> PyResult<bool> { |
|
350 | 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 | 356 | def __getitem__(&self, key: PyObject) -> PyResult<PyObject> { |
@@ -438,7 +440,10 b' py_class!(pub class DirstateMap |py| {' | |||
|
438 | 440 | |
|
439 | 441 | def copymapgetitem(&self, key: PyObject) -> PyResult<PyBytes> { |
|
440 | 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 | 447 | Some(copy) => Ok(PyBytes::new(py, copy.as_ref())), |
|
443 | 448 | None => Err(PyErr::new::<exc::KeyError, _>( |
|
444 | 449 | py, |
General Comments 0
You need to be logged in to leave comments.
Login now