This is an archive of the discontinued Mercurial Phabricator instance.

dirstate-tree: simplify the control flow in the Node.insert method
ClosedPublic

Authored by marmoute on Oct 13 2020, 5:25 PM.

Details

Summary

But explicitly with the special case early, laying out the various case become
simpler.

(The initial motivation was to make some future lifetime error simpler).

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

marmoute created this revision.Oct 13 2020, 5:25 PM
Alphare accepted this revision.Oct 16 2020, 4:48 AM
Alphare added a subscriber: Alphare.

We did this cleanup together, this is better than the original code. Thanks

This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.