Patchwork D11657: rust: Reformat source code

login
register
mail settings
Submitter phabricator
Date Oct. 14, 2021, noon
Message ID <differential-rev-PHID-DREV-abqtiihgc5edgznpfwci-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49981/
State Superseded
Headers show

Comments

phabricator - Oct. 14, 2021, noon
SimonSapin created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This fixes test-check-rust-format.t which is currently failing
  on the default branch.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

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

CHANGE DETAILS




To: SimonSapin, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/rust/hg-core/src/revlog/revlog.rs b/rust/hg-core/src/revlog/revlog.rs
--- a/rust/hg-core/src/revlog/revlog.rs
+++ b/rust/hg-core/src/revlog/revlog.rs
@@ -76,7 +76,8 @@ 
                 Some(index_mmap) => {
                     let version = get_version(&index_mmap)?;
                     if version != 1 {
-                        // A proper new version should have had a repo/store requirement.
+                        // A proper new version should have had a repo/store
+                        // requirement.
                         return Err(HgError::corrupted("corrupted revlog"));
                     }
 
@@ -424,6 +425,6 @@ 
             .with_version(1)
             .build();
 
-        assert_eq!(get_version(&bytes).map_err(|_err|()), Ok(1))
+        assert_eq!(get_version(&bytes).map_err(|_err| ()), Ok(1))
     }
 }