D8110: rust-dirstatemap: cache non normal and other parent set

Alphare (Raphaël Gomès) phabricator at mercurial-scm.org
Fri Feb 14 11:31:55 UTC 2020


Alphare added inline comments.

INLINE COMMENTS

> kevincox wrote in dirstate_map.rs:251
> You should be able to use `.as_mut()` just like you are currently doing in the caller.

`as_mut()` only does `&mut Option<T> -> Option<&mut T>`, which isn't always what we want (however you can argue that it would save a few keystrokes), but calling `unwrap()` circles back to the same `error[E0515]: cannot return value referencing temporary value`.

REPOSITORY
  rHG Mercurial

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

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

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


More information about the Mercurial-devel mailing list