( )⚙ D7300 rust-status: refactor dispatch case for normal files

This is an archive of the discontinued Mercurial Phabricator instance.

rust-status: refactor dispatch case for normal files
ClosedPublic

Authored by Alphare on Nov 7 2019, 5:18 AM.

Details

Summary

This should make the code easier to read and more idiomatic.

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

Alphare created this revision.Nov 7 2019, 5:18 AM
kevincox accepted this revision.Nov 7 2019, 1:24 PM
kevincox added inline comments.
rust/hg-core/src/dirstate/status.rs
30–42

I see a lot of these and in general I would recommend against it. The compiler is smart. Unless profiling shows an advantage in a specific case I would leave them out.

Alphare updated this revision to Diff 17741.Nov 8 2019, 7:51 AM
Alphare marked an inline comment as done.Nov 8 2019, 7:54 AM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.