rhg: stop shadowing `exit` function stable
authorRaphaël Gomès <rgomes@octobus.net>
Thu, 03 Nov 2022 15:57:37 +0100
branchstable
changeset 49566 05ef5f097df4
parent 49565 04e6add9e4dc
child 49569 5318ac25dfdc
rhg: stop shadowing `exit` function This will be useful for the next patch which needs it.
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() -> ! {