From e0c90a6502b1acd4454f150e0003c63c4fac5208 Mon Sep 17 00:00:00 2001 From: Thomas O'Donnell Date: Thu, 24 Oct 2019 12:31:17 +0200 Subject: [PATCH] refactor: Remove to remove unneeded mutability (#577) Removed a couple of unneeded `mut`s that were pointed out by `cargo check`. --- src/modules/git_branch.rs | 2 +- src/print.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/git_branch.rs b/src/modules/git_branch.rs index c0b6274e..56414b19 100644 --- a/src/modules/git_branch.rs +++ b/src/modules/git_branch.rs @@ -9,7 +9,7 @@ use crate::configs::git_branch::GitBranchConfig; /// Will display the branch name if the current directory is a git repo pub fn module<'a>(context: &'a Context) -> Option> { let mut module = context.new_module("git_branch"); - let mut config = GitBranchConfig::try_load(module.config); + let config = GitBranchConfig::try_load(module.config); module.set_style(config.style); module.get_prefix().set_value("on "); diff --git a/src/print.rs b/src/print.rs index 69a954fa..925c1a02 100644 --- a/src/print.rs +++ b/src/print.rs @@ -47,7 +47,7 @@ pub fn get_prompt(context: Context) -> String { .collect::>(); // Remove segments set to `None` let mut print_without_prefix = true; - let mut printable = modules.iter(); + let printable = modules.iter(); for module in printable { // Skip printing the prefix of a module after the line_break