Patchwork D12541: rust-dirstatemap: remove unused helper from the old API

login
register
mail settings
Submitter phabricator
Date April 12, 2022, 4:07 p.m.
Message ID <differential-rev-PHID-DREV-3z7b64tabvu6kner6jdx-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50889/
State New
Headers show

Comments

phabricator - April 12, 2022, 4:07 p.m.
Alphare 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/D12541

AFFECTED FILES
  rust/hg-core/src/dirstate_tree/dirstate_map.rs

CHANGE DETAILS




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

Patch

diff --git a/rust/hg-core/src/dirstate_tree/dirstate_map.rs b/rust/hg-core/src/dirstate_tree/dirstate_map.rs
--- a/rust/hg-core/src/dirstate_tree/dirstate_map.rs
+++ b/rust/hg-core/src/dirstate_tree/dirstate_map.rs
@@ -22,7 +22,6 @@ 
 use crate::DirstateMapError;
 use crate::DirstateParents;
 use crate::DirstateStatus;
-use crate::EntryState;
 use crate::FastHashbrownMap as FastHashMap;
 use crate::PatternFileWarning;
 use crate::StatusError;
@@ -346,18 +345,6 @@ 
         }
     }
 
-    pub(super) fn state(
-        &self,
-    ) -> Result<Option<EntryState>, DirstateV2ParseError> {
-        Ok(self.entry()?.and_then(|e| {
-            if e.any_tracked() {
-                Some(e.state())
-            } else {
-                None
-            }
-        }))
-    }
-
     pub(super) fn cached_directory_mtime(
         &self,
     ) -> Result<Option<TruncatedTimestamp>, DirstateV2ParseError> {