Patchwork D7813: revlog: run rustfmt nightly

login
register
mail settings
Submitter phabricator
Date Jan. 8, 2020, 7:38 p.m.
Message ID <differential-rev-PHID-DREV-leumet4ok6cxuwme3t45-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/44193/
State Superseded
Headers show

Comments

phabricator - Jan. 8, 2020, 7:38 p.m.
durin42 created this revision.
Herald added subscribers: mercurial-devel, kevincox.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  I'm a little nervous about folding this back (might be nightly rustfmt
  mismatches?) so I want someone to review this.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  rust/hg-cpython/src/revlog.rs

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: kevincox, mercurial-devel
phabricator - Jan. 10, 2020, 1:41 p.m.
gracinet added a comment.


  For the record, I have the exact same changes with this:
  
    $ rustfmt +nightly --version    
    rustfmt 1.4.11-nightly (1838235 2019-12-03)
  
  LGTM to fold

REPOSITORY
  rHG Mercurial

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

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

To: durin42, #hg-reviewers
Cc: gracinet, kevincox, mercurial-devel

Patch

diff --git a/rust/hg-cpython/src/revlog.rs b/rust/hg-cpython/src/revlog.rs
--- a/rust/hg-cpython/src/revlog.rs
+++ b/rust/hg-cpython/src/revlog.rs
@@ -7,14 +7,17 @@ 
 
 use crate::cindex;
 use cpython::{
-    ObjectProtocol, PyClone, PyDict, PyModule, PyObject, PyResult, PyTuple, Python, PythonObject,
-    ToPyObject,
+    ObjectProtocol, PyClone, PyDict, PyModule, PyObject, PyResult, PyTuple,
+    Python, PythonObject, ToPyObject,
 };
 use hg::Revision;
 use std::cell::RefCell;
 
 /// Return a Struct implementing the Graph trait
-pub(crate) fn pyindex_to_graph(py: Python, index: PyObject) -> PyResult<cindex::Index> {
+pub(crate) fn pyindex_to_graph(
+    py: Python,
+    index: PyObject,
+) -> PyResult<cindex::Index> {
     match index.extract::<MixedIndex>(py) {
         Ok(midx) => Ok(midx.clone_cindex(py)),
         Err(_) => cindex::Index::new(py, index),