Alphare added inline comments.

INLINE COMMENTS

> kevincox wrote in dirstate_map.rs:38
> I don't understand why an `Option<HashSet>` is faster than a `HashSet`. Could 
> you add some explanation to the commit message? Is this to avoid attempting 
> to initialize the entry multiple times?

Using `Option` adds a layer of indirection so that any endpoint that needs the 
set can initialize it without having to doubt if it was already initialized.

> kevincox wrote in dirstate_map.rs:251
> If we have just set the fields to Some(..) in the previous line can't we do 
> the unwrap here where it is obviously correct?

Unwrapping creates a temporary value that is dropped instantly, so unless I'm 
not seeing something, I don't think we can.

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
Cc: Alphare, kevincox, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to