diff rust/rhg/src/main.rs @ 49566:05ef5f097df4 stable

rhg: stop shadowing `exit` function This will be useful for the next patch which needs it.
author Raphaël Gomès <rgomes@octobus.net>
date Thu, 03 Nov 2022 15:57:37 +0100
parents e84064e88e5d
children 5318ac25dfdc
line wrap: on
line diff
--- 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() -> ! {