Patchwork D9096: hg-core: minor code style change (D8958#inline-14986 followup)

login
register
mail settings
Submitter phabricator
Date Sept. 28, 2020, 1:48 p.m.
Message ID <differential-rev-PHID-DREV-7ysc72f3gjlnut2ehwuo-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47311/
State Superseded
Headers show

Comments

phabricator - Sept. 28, 2020, 1:48 p.m.
acezar created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

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

CHANGE DETAILS




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

Patch

diff --git a/rust/hg-core/src/revlog/index.rs b/rust/hg-core/src/revlog/index.rs
--- a/rust/hg-core/src/revlog/index.rs
+++ b/rust/hg-core/src/revlog/index.rs
@@ -100,10 +100,7 @@ 
 
         // Override the offset of the first revision as its bytes are used
         // for index's metadata (saving space because it is alway 0)
-        let offset_override = match rev {
-            0 => Some(0),
-            _ => None,
-        };
+        let offset_override = if rev == 0 { Some(0) } else { None };
 
         Some(IndexEntry {
             bytes,