From f3dde0185d82b77e2bcff358f88be492dea0ee68 Mon Sep 17 00:00:00 2001 From: ms2300 Date: Sat, 25 Aug 2018 23:27:10 -0600 Subject: [PATCH] Modifying changing config for efficiency --- src/main.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 6ec1ee62..5d5b1800 100644 --- a/src/main.rs +++ b/src/main.rs @@ -130,12 +130,11 @@ pub fn list_languages(assets: &HighlightingAssets, term_width: usize) { pub fn list_themes(assets: &HighlightingAssets, config: &mut Config) { let themes = &assets.theme_set.themes; + config.files = vec![Some("assets/hello.rs")]; for (theme, _) in themes.iter() { println!("{}", theme); config.theme = theme.to_string(); - config.files = vec![Some("assets/hello.rs")]; - let controller = Controller::new(&config, &assets); - let _res = controller.run(); + let _controller = Controller::new(&config, &assets).run(); } }