From 3b90ada7354a2a1a1a4344b219d09c1a4fe3ceaf Mon Sep 17 00:00:00 2001 From: ms2300 Date: Mon, 27 Aug 2018 15:18:15 -0600 Subject: [PATCH] Mutation done correctly --- src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 056b0f0e..7b30c9dd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -131,8 +131,9 @@ pub fn list_languages(assets: &HighlightingAssets, term_width: usize) { } } -pub fn list_themes(assets: &HighlightingAssets, config: &mut Config) { +pub fn list_themes(assets: &HighlightingAssets, cfg: &Config) { let themes = &assets.theme_set.themes; + let mut config = cfg.clone(); let mut style = HashSet::new(); style.insert(OutputComponent::Plain); config.files = vec![Some("assets/theme_preview.rs")]; @@ -164,7 +165,7 @@ fn run() -> Result { Ok(true) } else if app.matches.is_present("list-themes") { - list_themes(&assets, &mut config.clone()); + list_themes(&assets, &config); Ok(true) } else {