Crate workspacer_run

Source

Functionsยง

run_with_crate
This new helper function run_with_crate parallels the existing run_with_workspace pattern but focuses on a single crate. It:
run_with_workspace
This helper is analogous to run_with_workspace_and_crate_name, but it only loads the workspace (optionally checking Git). No crate name needed.
run_with_workspace_and_crate_name
Key idea: Use a higher-ranked trait bound (HRTB) so that the closure can borrow &mut workspace and &crate_name for the duration of the async future without lifetime conflicts.
run_with_workspace_and_two_crate_names
We define a new helper function that is basically the same pattern as run_with_workspace_and_crate_name, but it takes two crate name strings. This avoids the lifetime conflict by using a higher-ranked trait bound.