This is an archive of the discontinued Mercurial Phabricator instance.

hg-core: remove the `Operation` trait
ClosedPublic

Authored by acezar on Aug 3 2020, 10:25 AM.

Details

Summary

There is no way to currently define a trait which can both return references
to self and to passed data, which is what we would need.
Generic Associated Types may fix this and allow us to have a unified interface.
See: rust #44265

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

acezar created this revision.Aug 3 2020, 10:25 AM
Alphare accepted this revision.Aug 3 2020, 11:00 AM
Alphare added a subscriber: Alphare.

To add to this change, it's also entirely possible that we may never need the trait altogether.

acezar updated this revision to Diff 22246.Aug 4 2020, 4:57 AM
indygreg accepted this revision.Aug 8 2020, 3:44 PM
This revision is now accepted and ready to land.Aug 8 2020, 3:44 PM
This revision was automatically updated to reflect the committed changes.