Skip to content

Commit

Permalink
Clone CONFIG_T instead of initializing it twice
Browse files Browse the repository at this point in the history
  • Loading branch information
Akmadan23 committed Feb 22, 2024
1 parent b9e6954 commit 4843fbd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ fn run_main(args: Args) -> Result<i32, AppError> {
}

// 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);
Expand All @@ -170,7 +169,7 @@ fn run_main(args: Args) -> Result<i32, AppError> {
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)?;
Expand Down

0 comments on commit 4843fbd

Please sign in to comment.