D6593: rust-minor-fixes: remove Deref in favor of explicit methods

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Fri Jul 5 08:51:59 EDT 2019


yuja added a comment.


  > +    pub fn contains_key(&self, key: &[u8]) -> bool {
  > +        self.inner.contains_key(key)
  > +    }
  > +
  > +    pub fn iter(&self) -> Iter<Vec<u8>, u32> {
  > +        self.inner.iter()
  > +    }
  
  Again,
  
  - **contains**() -> inner.contains_key()
  - iter() -> inner.**keys**()
  
  Somewhat similar to HashSet, which is basically a proxy type to
  HashMap<T, ()>.
  
  I queued this as I think it's strictly better than using Deref, but I expect
  a follow up patch. Thanks.

REPOSITORY
  rHG Mercurial

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

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

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


More information about the Mercurial-devel mailing list