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

kevincox (Kevin Cox) phabricator at mercurial-scm.org
Wed Jul 10 11:22:18 EDT 2019


kevincox added inline comments.

INLINE COMMENTS

> dirs_multiset.rs:131
> +
> +    pub fn iter(&self) -> Iter<Vec<u8>, u32> {
> +        self.inner.iter()

Returning a `std::collections::hash_map::Iter` binds you to this implementation. I would recommend instead returning `impl Iterator<Item=(&[u8], u32)>`.

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