Function git_branchless_invoke::do_main_and_drop_locals
source · pub fn do_main_and_drop_locals<T: Parser>(
f: impl Fn(CommandContext, T) -> EyreExitOr<()>,
args: Vec<OsString>
) -> Result<i32>Expand description
Wrapper function for main to ensure that Drop is called for local
variables, since std::process::exit will skip them. You probably want to
call invoke_subcommand_main instead.