This is an archive of the discontinued Mercurial Phabricator instance.

copies-rust: split up combine_changeset_copies function into a struct
ClosedPublic

Authored by SimonSapin on Jan 6 2021, 9:12 AM.

Details

Summary

… such that each iteration of its former loop is now a method call,
with the caller driving the loop.

This entirely removes the need for the DataHolder hack:
the method now takes a ChangedFiles<'_> parameter that borrows
a bytes buffer that can be owned by the caller’s stack frame,
just for the duration of that call.

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

SimonSapin created this revision.Jan 6 2021, 9:12 AM
Alphare accepted this revision.Jan 22 2021, 4:48 AM
Alphare added a subscriber: Alphare.
Alphare added inline comments.
rust/hg-core/src/copy_tracing.rs
380–381

This should be a docstring, same goes for finish

baymax updated this revision to Diff 25703.Feb 22 2021, 9:25 AM

✅ refresh by Heptapod after a successful CI run (🐙 💚)

baymax updated this revision to Diff 25740.Feb 22 2021, 11:00 AM

✅ refresh by Heptapod after a successful CI run (🐙 💚)

baymax updated this revision to Diff 25785.Feb 22 2021, 3:47 PM

✅ refresh by Heptapod after a successful CI run (🐙 💚)

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