This is an archive of the discontinued Mercurial Phabricator instance.

rust-dirstatemap: expand the wrapping code a bit
ClosedPublic

Authored by marmoute on Jul 4 2021, 5:50 PM.

Details

Summary

This is easier to read.

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.Jul 4 2021, 5:50 PM
SimonSapin accepted this revision.Jul 5 2021, 12:29 AM
SimonSapin added a subscriber: SimonSapin.
SimonSapin added inline comments.
rust/hg-cpython/src/dirstate/dirstate_map.rs
130–135

No need to go back for this, but there’s syntactic sugar in struct literals when a field’s value is set to that of a local variable of the same name:

let entry = DirstateEntry {
    state,
    mode,
    size,
    mtime,
};
pulkit accepted this revision.Jul 6 2021, 12:32 PM
This revision is now accepted and ready to land.Jul 6 2021, 12:32 PM
baymax updated this revision to Diff 28862.Jul 6 2021, 2:08 PM

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

This revision was automatically updated to reflect the committed changes.