From 4843fbdbc54b30a762a0eb3f53757869ceac846e Mon Sep 17 00:00:00 2001 From: Akmadan23 Date: Thu, 22 Feb 2024 16:54:16 +0100 Subject: [PATCH] Clone `CONFIG_T` instead of initializing it twice --- src/main.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 6da70b2f5..f52b0a5b4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -157,7 +157,6 @@ fn run_main(args: Args) -> Result { } // make sure all configs have been loaded before starting - let config = AppConfig::get_config(); let keymap = AppKeyMapping::get_config(); lazy_static::initialize(&CONFIG_T); lazy_static::initialize(&THEME_T); @@ -170,7 +169,7 @@ fn run_main(args: Args) -> Result { lazy_static::initialize(&USERNAME); lazy_static::initialize(&HOSTNAME); - let mut context = AppContext::new(config, args.clone()); + let mut context = AppContext::new(CONFIG_T.clone(), args.clone()); { let mut backend: ui::AppBackend = ui::AppBackend::new(context.config_ref().mouse_support)?; run::run_loop(&mut backend, &mut context, keymap)?;