D7793: rust-nodemap: mutable NodeTree data structure

kevincox (Kevin Cox) phabricator at mercurial-scm.org
Thu Jan 16 05:15:12 EST 2020


kevincox added inline comments.
kevincox accepted this revision.

INLINE COMMENTS

> nodemap.rs:158
>      readonly: Box<dyn Deref<Target = [Block]> + Send>,
> +    growable: Vec<Block>,
> +    root: Block,

This strikes me as a weird name. The fact that it is an adjective rather than a noun is a hint. Can you rename to answer "Growable what?"

> nodemap.rs:249
> +            readonly, self.growable, self.root
> +        )
>      }

I would use https://doc.rust-lang.org/std/fmt/struct.Formatter.html#method.debug_struct for consistency unless you really want to avoid printing the struct name.

REPOSITORY
  rHG Mercurial

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

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

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


More information about the Mercurial-devel mailing list