# HG changeset patch # User Raphaël Gomès # Date 1667487457 -3600 # Node ID 05ef5f097df47d9b05bf3448a58599078feec700 # Parent 04e6add9e4dcb55887e55e4590b71bf671dbd5d7 rhg: stop shadowing `exit` function This will be useful for the next patch which needs it. diff -r 04e6add9e4dc -r 05ef5f097df4 rust/rhg/src/main.rs --- a/rust/rhg/src/main.rs Thu Nov 03 15:43:04 2022 +0100 +++ b/rust/rhg/src/main.rs Thu Nov 03 15:57:37 2022 +0100 @@ -301,7 +301,7 @@ } }; - let exit = + let simple_exit = |ui: &Ui, config: &Config, result: Result<(), CommandError>| -> ! { exit( &argv, @@ -317,7 +317,7 @@ ) }; let early_exit = |config: &Config, error: CommandError| -> ! { - exit(&Ui::new_infallible(config), &config, Err(error)) + simple_exit(&Ui::new_infallible(config), &config, Err(error)) }; let repo_result = match Repo::find(&non_repo_config, repo_path.to_owned()) { @@ -355,7 +355,7 @@ repo_result.as_ref(), config, ); - exit(&ui, &config, result) + simple_exit(&ui, &config, result) } fn main() -> ! {