Page MenuHomePhabricator

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

Authored by Alphare on Thu, Nov 7, 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.Thu, Nov 7, 5:18 AM
kevincox accepted this revision.Thu, Nov 7, 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.Fri, Nov 8, 7:51 AM
Alphare marked an inline comment as done.Fri, Nov 8, 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.