Page MenuHomePhabricator

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

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

Details

Reviewers
Alphare
Group Reviewers
hg-reviewers
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
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

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

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