( )⚙ D7299 rust-status: return a ParallelIterator instead of a Vec from stat_dmap_entries

This is an archive of the discontinued Mercurial Phabricator instance.

rust-status: return a ParallelIterator instead of a Vec from stat_dmap_entries
ClosedPublic

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

Details

Summary

This allows the caller function to choose when and how the iteration and/or
collection happens. This change also cleans up the now unused filter_map.

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:22 PM
kevincox added inline comments.
rust/hg-core/src/dirstate/status.rs
126

This can be replaced with:

let meta = root_dir.as_ref().join(hg_path_to_path_buf(filename)?).symlink_metadata();

Although I would probably also put hg_path_to_path_buf(filename)? into a variable for readability.

Alphare updated this revision to Diff 17740.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.