1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-12-25 19:21:08 +00:00

refactor: Remove to remove unneeded mutability (#577)

Removed a couple of unneeded `mut`s that were pointed out by `cargo
check`.
This commit is contained in:
Thomas O'Donnell 2019-10-24 12:31:17 +02:00 committed by Matan Kushner
parent e34b3622f3
commit e0c90a6502
2 changed files with 2 additions and 2 deletions

View File

@ -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<Module<'a>> {
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 ");

View File

@ -47,7 +47,7 @@ pub fn get_prompt(context: Context) -> String {
.collect::<Vec<Module>>(); // 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