Patchwork D8228: rust-format: make rustfmt happy

login
register
mail settings
Submitter phabricator
Date March 5, 2020, 4:33 p.m.
Message ID <69fc38e1d6d4cafa96330b1b15e99580@localhost.localdomain>
Download mbox | patch
Permalink /patch/45506/
State Not Applicable
Headers show

Comments

phabricator - March 5, 2020, 4:33 p.m.
Closed by commit rHG927137fc3035: rust-format: make rustfmt happy (authored by Alphare).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8228?vs=20507&id=20510

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8228/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D8228

AFFECTED FILES
  rust/hg-cpython/src/dirstate/dirstate_map.rs

CHANGE DETAILS




To: Alphare, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/rust/hg-cpython/src/dirstate/dirstate_map.rs b/rust/hg-cpython/src/dirstate/dirstate_map.rs
--- a/rust/hg-cpython/src/dirstate/dirstate_map.rs
+++ b/rust/hg-cpython/src/dirstate/dirstate_map.rs
@@ -348,7 +348,9 @@ 
 
     def __contains__(&self, key: PyObject) -> PyResult<bool> {
         let key = key.extract::<PyBytes>(py)?;
-        Ok(self.inner_shared(py).borrow().contains_key(HgPath::new(key.data(py))))
+        Ok(self.inner_shared(py)
+               .borrow()
+               .contains_key(HgPath::new(key.data(py))))
     }
 
     def __getitem__(&self, key: PyObject) -> PyResult<PyObject> {
@@ -438,7 +440,10 @@ 
 
     def copymapgetitem(&self, key: PyObject) -> PyResult<PyBytes> {
         let key = key.extract::<PyBytes>(py)?;
-        match self.inner_shared(py).borrow().copy_map.get(HgPath::new(key.data(py))) {
+        match self.inner_shared(py)
+                  .borrow()
+                  .copy_map
+                  .get(HgPath::new(key.data(py))) {
             Some(copy) => Ok(PyBytes::new(py, copy.as_ref())),
             None => Err(PyErr::new::<exc::KeyError, _>(
                 py,